New submission from Chris Jerdonek <chris.jerdo...@gmail.com>:

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__
'int'
>>> p = functools.partial(int)
>>> p.__qualname__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'functools.partial' object has no attribute '__qualname__'

----------
components: Library (Lib)
messages: 323947
nosy: chris.jerdonek
priority: normal
severity: normal
status: open
title: functools.partial objects have no __qualname__ attribute
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34475>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to