New submission from Dino Viehland: 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. ---------- components: Interpreter Core messages: 258119 nosy: dino.viehland priority: normal severity: normal status: open title: __qualname__ different when calling generator object w/ functions.partial type: behavior versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26093> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com