[issue26093] __qualname__ different when calling generator object w/ functions.partial

2019-10-03 Thread Dong-hee Na


Dong-hee Na  added the comment:

Python 3.9.0a0 (heads/bpo-31722:fc4a044a3c, Oct  4 2019, 03:10:14)
[Clang 11.0.0 (clang-1100.0.33.8)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import functools
>>> def f():
... def g():
... yield 1
... return g
...
>>> functools.partial(f())().__qualname__ == f()().__qualname__
True
>>> functools.partial(f())().__qualname__
'f..g'
>>> f()().__qualname__
'f..g'

Looks like that this issue is fixed

--
nosy: +corona10
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26093] __qualname__ different when calling generator object w/ functions.partial

2019-08-24 Thread Batuhan


Batuhan  added the comment:

This bug is fixed in 3.9 (probably in 3.8 too)

--
nosy: +BTaskaya

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26093] __qualname__ different when calling generator object w/ functions.partial

2018-09-10 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26093] __qualname__ different when calling generator object w/ functions.partial

2016-01-13 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26093] __qualname__ different when calling generator object w/ functions.partial

2016-01-12 Thread Dino Viehland

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com