[issue14288] Make iterators pickleable

Antoine Pitrou report at bugs.python.org
Sun Mar 25 14:02:38 CEST 2012


Antoine Pitrou <pitrou at free.fr> added the comment:

> The thing to emphasise here is that pickling an iterator is
> "destructive": afterwards the original iterator will be "empty".

If you look at the patch it isn't (or shouldn't be).

I agree with Raymond that accumulating dict and set iterators in a list is a bit weird. That said, with hash randomization, perhaps we can't do any better (the order of elements in the internal table depends on the process-wide hash seed).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14288>
_______________________________________


More information about the Python-bugs-list mailing list