Ivan Levkivskyi <levkivs...@gmail.com> added the comment:

OK, so the crux of the bug is this difference:

>>> a = (1, 2)
>>> tuple(x for x in a)
(1, 2)
>>> NamedTupleAttribute(x for x in a)
NamedTupleAttribute(example=<generator object <genexpr> at 0x10e2e52a0>)

A potential solution would be to either use `type(obj) in (list, tuple)` 
instead of `isinstance(obj, (list, tuple))` (and thus cause using copy.deepcopy 
for everything else), but this might break some use cases (IMO quite unlikely).

Any other thoughts?

----------

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

Reply via email to