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 vstinner
Recipients SzieberthAdam, gvanrossum, r.david.murray, vstinner, yselivanov
Date 2014-06-11.14:18:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1402496340.12.0.943928274591.issue21205@psf.upfronthosting.co.za>
In-reply-to
Content
gen_qualname.patch: add a new "__qualname__" attribute to generators and change how the name is set: use the name of the function, instead of using the name of the code.

Incompatible changes of this patch:

- repr(generator) now shows the qualified name instead of the name
- generator name comes from the function name which may be different

If the function has a name different than the code (if the function name was changed, for example by @functools.wraps), the generator now gets the name from the function, no more from the code object. IMO it's the expected behaviour, and it's more useful.

I'm writing on email to python-dev to discuss these changes.
History
Date User Action Args
2014-06-11 14:19:00vstinnersetrecipients: + vstinner, gvanrossum, r.david.murray, yselivanov, SzieberthAdam
2014-06-11 14:19:00vstinnersetmessageid: <1402496340.12.0.943928274591.issue21205@psf.upfronthosting.co.za>
2014-06-11 14:19:00vstinnerlinkissue21205 messages
2014-06-11 14:18:59vstinnercreate