[issue2480] pickling of large recursive structures fails
Alexandre Vassalotti
report at bugs.python.org
Sun Apr 27 04:48:22 CEST 2008
Alexandre Vassalotti <alexandre at peadrop.com> added the comment:
Bob Kline wrote:
> I just ran into this behavior with an attempt to pickle a dom tree
> for an XML document whose nesting level never got deeper than nine
> child nodes, and indeed it crashed the interpreter.
Pickling recursive data-structure should not crash the interpreter.
Please open a new issue and don't forget to provide an example case.
> the documentation for the pickle module [1] which claims (summarizing)
> that serializing recursive objects using marshal will fail but
> pickling recursive objects will not fail.
The section of documentation, you are referring to, uses the term
"recursive object" to means an object which contains a reference to
itself. Anyway, the documentation [1] states clearly:
Trying to pickle a highly recursive data structure may exceed the
maximum recursion depth, a RuntimeError will be raised in this
case. You can carefully raise this limit with sys.setrecursionlimit().
[1]: http://docs.python.org/lib/node317.html
----------
nosy: +alexandre.vassalotti
type: crash -> feature request
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2480>
__________________________________
More information about the Python-bugs-list
mailing list