]> granicus.if.org Git - python/commit
Issue #21205: Add a new ``__qualname__`` attribute to generator, the qualified
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 16 Jun 2014 13:59:28 +0000 (15:59 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 16 Jun 2014 13:59:28 +0000 (15:59 +0200)
commit40ee30181f7f7c71d6b49ceef35b5d3d20b88a6d
tree4f6813c9aff51c1f467504698456c7c4a1c33244
parent26171993fe629c614e62c7aef1196c0f53a30d85
Issue #21205: Add a new ``__qualname__`` attribute to generator, the qualified
name, and use it in the representation of a generator (``repr(gen)``). The
default name of the generator (``__name__`` attribute) is now get from the
function instead of the code. Use ``gen.gi_code.co_name`` to get the name of
the code.
Doc/library/inspect.rst
Doc/whatsnew/3.5.rst
Include/genobject.h
Lib/test/test_generators.py
Misc/NEWS
Objects/genobject.c
Python/ceval.c