[Python-Dev] making python's c iterators picklable (http://bugs.python.org/issue14288) (original) (raw)

Jack Diederich jackdied at gmail.com
Tue Mar 13 23:58:07 CET 2012


2012/3/13 Kristján Valur Jónsson <kristjan at ccpgames.com>:

http://bugs.python.org/issue14288

In my opinion, any objects that have simple and obvious pickle semantics should be picklable.  Iterators are just regular objects with some state. They are not file pointers or sockets or database cursors.  And again, I argue that if these objects were implemented in .py, they would already be automatically picklable (indeed, itertools.py was).  The detail that some iterators in standard python are implemented in C should not automatically restrict their usage for no particular reason.

+1, things that can be pickled should be pickleable.

-Jack



More information about the Python-Dev mailing list