Author sir-sigurd
Recipients josh.r, sir-sigurd
Date 2018-09-06.06:40:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1536216038.32.0.56676864532.issue34574@psf.upfronthosting.co.za>
In-reply-to
Content
Other iterators either don't support pickling or aren't mutated during pickling:

In [10]: it = iter({1})

In [11]: pickle.dumps(it)
Out[11]: b'\x80\x04\x95\x1e\x00\x00\x00\x00\x00\x00\x00\x8c\x08builtins\x94\x8c\x04iter\x94\x93\x94]\x94K\x01a\x85\x94R\x94.'

In [12]: list(it)
Out[12]: [1]

In [13]: it = (x for x in {1})

In [14]: pickle.dumps(it)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-14-7e86a183a31c> in <module>()
----> 1 pickle.dumps(it)

TypeError: can't pickle generator objects
History
Date User Action Args
2018-09-06 06:40:38sir-sigurdsetrecipients: + sir-sigurd, josh.r
2018-09-06 06:40:38sir-sigurdsetmessageid: <1536216038.32.0.56676864532.issue34574@psf.upfronthosting.co.za>
2018-09-06 06:40:38sir-sigurdlinkissue34574 messages
2018-09-06 06:40:38sir-sigurdcreate