[issue14288] Make iterators pickleable
report at bugs.python.org
Sat Mar 24 23:40:38 CET 2012
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
Has python-dev discussion been launched? It is far from clear that this is worth doing. Pickling runtime structures may be a normal use case for Stackless but isn't a normal use case for regular Python.
Also, it seems pointless to start down this path because it will always be incomplete (i.e. pickling running generators, or socket streams, etc).
It also seems to be at odds with the normal use case for passing around partially consumed iterators -- the laziness and memory friendliness is a desired feature; however, the patch pickles some iterators (such as dicts) by running them to completion and storing *all* of the results that would have been returned.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list