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 alexandre.vassalotti
Recipients alexandre.vassalotti, pitrou
Date 2013-10-19.17:56:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1382205392.94.0.868971273395.issue19301@psf.upfronthosting.co.za>
In-reply-to
Content
The value of __qualname__ for globals declared in function scope doesn't seems right to me:

>>> def f():
...    global C
...    class C: pass
...    return C.__qualname__
...
>>> f()
'f.<locals>.C'

It would be much more useful to return 'C' in this case. In my case, fixing this would help me write cleaner unit tests for pickle, since it would allow me to keep test classes with their test code.
History
Date User Action Args
2013-10-19 17:56:33alexandre.vassalottisetrecipients: + alexandre.vassalotti, pitrou
2013-10-19 17:56:32alexandre.vassalottisetmessageid: <1382205392.94.0.868971273395.issue19301@psf.upfronthosting.co.za>
2013-10-19 17:56:32alexandre.vassalottilinkissue19301 messages
2013-10-19 17:56:32alexandre.vassalotticreate