[issue34475] functools.partial objects have no __qualname__ attribute

2018-10-18 Thread Chris Jerdonek
Chris Jerdonek added the comment: Sorry, I'm out of practice. I thought I closed this when I marked it rejected. -- ___ Python tracker ___

[issue34475] functools.partial objects have no __qualname__ attribute

2018-10-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34475] functools.partial objects have no __qualname__ attribute

2018-10-18 Thread STINNER Victor
STINNER Victor added the comment: functools.partial objects have no __qualname__ attribute, but they don't have a __name__ attribute neither. $ python3 Python 3.6.6 (default, Jul 19 2018, 14:25:17) >>> import functools >>> func=int >>> p=functools.partial(func) >>> p.__name__

[issue34475] functools.partial objects have no __qualname__ attribute

2018-10-18 Thread Chris Jerdonek
Chris Jerdonek added the comment: > It shouldn't be the __qualname__ of the wrapped function Yes, I agree with you. I was thinking it should be similar to what it would be for a function defined at the same location. -- ___ Python tracker

[issue34475] functools.partial objects have no __qualname__ attribute

2018-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: partial objects lack many other function attributes: __name__, __module__ (and __qualname__ doesn't make sense without __module__), __annotations__, __get__(), etc. It would be nice to make these types more similar, but attributes shouldn't lie. And I am

[issue34475] functools.partial objects have no __qualname__ attribute

2018-10-17 Thread Chris Jerdonek
Chris Jerdonek added the comment: Okay, I thought a partial object was supposed to "look" like a function. I'm okay with closing this. -- resolution: -> rejected ___ Python tracker

[issue34475] functools.partial objects have no __qualname__ attribute

2018-10-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't see a problem. Not all callables have the __qualname__ attribute. It is not the part of the protocol. The code that expects the __qualname__ attribute should be fixed. -- nosy: +serhiy.storchaka ___

[issue34475] functools.partial objects have no __qualname__ attribute

2018-10-16 Thread hongweipeng
hongweipeng added the comment: partial() return an instance not class or function. Why it need __qualname__ attribute? Ref: https://www.python.org/dev/peps/pep-3155/ -- ___ Python tracker

[issue34475] functools.partial objects have no __qualname__ attribute

2018-09-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: It seems __repr__ call to partial object has qualname but I think it always returns "partial". Ref : https://github.com/python/cpython/blob/0afada163c7ef25c3a9d46ed445481fb69f2ecaf/Lib/functools.py#L276 >>> import functools >>> int.__qualname__

[issue34475] functools.partial objects have no __qualname__ attribute

2018-09-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34475] functools.partial objects have no __qualname__ attribute

2018-09-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: Using p.func would name the function passed to functools.partial() rather than the partial object itself. -- ___ Python tracker ___

[issue34475] functools.partial objects have no __qualname__ attribute

2018-09-09 Thread hongweipeng
hongweipeng added the comment: the functools.partial returns an instance not fun or cls.using `p.func.__qualname__` may be you want. -- nosy: +hongweipeng ___ Python tracker

[issue34475] functools.partial objects have no __qualname__ attribute

2018-08-23 Thread Chris Jerdonek
New submission from Chris Jerdonek : functools.partial objects have no __qualname__ attribute. This means, for example, that code expecting a callable that logs the __qualname__ attribute can break when passed a functools.partial object. Example: >>> import functools >>> int.__qualname__