[issue21205] Add __qualname__ attribute to Python generators and change default __name__

STINNER Victor report at bugs.python.org
Mon Jun 16 16:20:06 CEST 2014


STINNER Victor added the comment:

Ok, this issue is now fixed in Python 3.5.

For Python 2.7 and 3.4, it may be possible to change how the generator name is set (from the function, not from the code object). It might break the backward compatibility, even if I don't think that anyone rely on the exact name of the generator, and the function name is more useful than the code name.

What do you think for Python 2.7 and 3.4: would you be ok to change also the generator name? I can write a patch which adds a new gi_name but the name would not be modifiable to limit the incompatible changes.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21205>
_______________________________________


More information about the Python-bugs-list mailing list