New submission from Alexandre Vassalotti: 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. ---------- assignee: alexandre.vassalotti messages: 200453 nosy: alexandre.vassalotti, pitrou priority: high severity: normal stage: needs patch status: open title: Globals declared in function scope have wrong __qualname__ type: behavior versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19301> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com