homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author siming85
Recipients siming85
Date 2015年04月29日.23:04:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1430348672.59.0.934013457033.issue24078@psf.upfronthosting.co.za>
In-reply-to
Content
if the same class name is used within a module, but defined in different contexts (either class in class or class in function), inspect.getsourcelines() on the class object ignores the object context and only returns the first matched name.
reproduce:
a.py
----
class A(object):
 class B(object):
 pass
class C(object):
 class B(object):
 pass
------------------
>>> import inspect
>>> import a
>>> inspect.getsourcelines(a.C.B)
([' class B(object):\n', ' pass\n'], 2)
History
Date User Action Args
2015年04月29日 23:04:32siming85setrecipients: + siming85
2015年04月29日 23:04:32siming85setmessageid: <1430348672.59.0.934013457033.issue24078@psf.upfronthosting.co.za>
2015年04月29日 23:04:32siming85linkissue24078 messages
2015年04月29日 23:04:32siming85create

AltStyle によって変換されたページ (->オリジナル) /