[issue34830] functools.partial is weak referncable

Serhiy Storchaka report at bugs.python.org
Fri Sep 28 05:50:15 EDT 2018


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Instances of many builtin types are not weak referencable.

>>> weakref.ref(0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: cannot create weak reference to 'int' object
>>> weakref.ref([])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: cannot create weak reference to 'list' object

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34830>
_______________________________________


More information about the Python-bugs-list mailing list