Author serhiy.storchaka
Recipients Jakob.Bowyer, Ramchandra Apte, alexandre.vassalotti, r.david.murray, rhettinger, serhiy.storchaka, terry.reedy
Date 2015-09-02.18:59:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Actually the tp_new field of list iterator class is NULL. Unpickler raises other error in such case (see issue24900 for example).

    UnpicklingError: NEWOBJ class argument has NULL tp_new

Backported to 2.7 the part of the patch for issue22995 fixes this issue.

>>> copy.copy(iter([]))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython-2.7/Lib/", line 88, in copy
    rv = reductor(2)
TypeError: can't pickle listiterator objects
Date User Action Args
2015-09-02 18:59:18serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, terry.reedy, alexandre.vassalotti, r.david.murray, Jakob.Bowyer, Ramchandra Apte
2015-09-02 18:59:18serhiy.storchakasetmessageid: <>
2015-09-02 18:59:18serhiy.storchakalinkissue14350 messages
2015-09-02 18:59:18serhiy.storchakacreate