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 dino.viehland
Recipients dino.viehland
Date 2016-01-12.22:33:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452638028.1.0.595104762218.issue26093@psf.upfronthosting.co.za>
In-reply-to
Content
import functools
def f():
    def g():
        yield 1
    return g

functools.partial(f())().__qualname__ != f()().__qualname__

The qualified name gets passed in via the interpreter loop with _PyEval_EvalCodeWithName calling PyGen_NewWithQualName.  If a generator object gets called from C then the qualified name gets lost.

It seems like _PyEval_EvalCodeWithName shouldn't exist and the generator code object should be able to get back to its qualified name so subtle differences like this don't happen.
History
Date User Action Args
2016-01-12 22:33:48dino.viehlandsetrecipients: + dino.viehland
2016-01-12 22:33:48dino.viehlandsetmessageid: <1452638028.1.0.595104762218.issue26093@psf.upfronthosting.co.za>
2016-01-12 22:33:48dino.viehlandlinkissue26093 messages
2016-01-12 22:33:47dino.viehlandcreate