[issue38293] Deepcopying property objects results in unexpected TypeError

Guðni Nathan report at bugs.python.org
Fri Sep 27 14:40:01 EDT 2019


Guðni Nathan <gudni.nathan at gmail.com> added the comment:

This bug appears to also affect shallow copies and can be reproduced with the following code:

>>> import copy
>>> obj = property()
>>> copy.copy(obj)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1264.0_x64__qbz5n2kfra8p0\lib\copy.py", line 96, in copy
    rv = reductor(4)
TypeError: can't pickle property objects

----------

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


More information about the Python-bugs-list mailing list