[issue2786] Names in traceback should have class names, if they're methods
Antoine Pitrou
report at bugs.python.org
Wed Aug 26 09:21:16 CEST 2015
Antoine Pitrou added the comment:
The reason I didn't put __qualname__ on code objects is that code objects don't have a __module__ either. That information, up to now, belongs on the module.
Conceptually, a code object could very well be used by multiple functions living in different modules. Now, in practice, I'm not sure that happens (except when constructing function objects on your own, which is not a terribly supported usecase I think).
Also, Ben makes a very point about being able to change a __qualname__. In particular, the user should *still* be able to change a function's __qualname__ even if it's technically stored on the code object.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2786>
_______________________________________
More information about the Python-bugs-list
mailing list