[issue11299] Allow deepcopying and pickling paused generators

Alexandre Vassalotti report at bugs.python.org
Sat Feb 26 17:03:38 CET 2011


Alexandre Vassalotti <alexandre at peadrop.com> added the comment:

The value of the instruction pointer depends on the byte-code. So it's not portable either.

But, the bigger issue is the fact generator objects do not have names we can refer to, unlike top-level functions and classes which pickle supports. Similarly, we can't pickle lambdas and nested-functions for this exact reason.

Personally, I haven't found a way around this. But, that doesn't mean there isn't one. If you find one, I will more than pleased to review it.

----------

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


More information about the Python-bugs-list mailing list