cPickle problems

Jeff Poole korvus at gmail.com
Mon Nov 20 17:13:01 CET 2006


> Jeff -
>
> Sorry not to reply sooner, I have been out of town with limited access to
> c.l.py.  Also, I didn't really pick up on "cPickle problems" as a
> pyparsing-related post. :)
>
> I would be happy to make ParseResults picklable, I didn't realize that this
> getattr behavior was defeating that capability.  I have had people
> successfully use pickle on pyparsing grammars, but have not had anyone
> report any pickle experience with ParseResults objects, either pro or con.
>
> I have a test version of pyparsing with pickling support added, and it
> passes my simple unit tests.  I could send it to you if you would test it
> against your program.
>
> -- Paul

Paul,

No problem, I think we've both been busy with other things.  I was
actually going to post something on the PyParsing wikispaces since I
wasn't sure if you checked here.  I wasn't actually intentionally
pickling any ParseResults objects, but I realized that in my parse
actions, I was making a copy of the "t" parameter, which is actually a
ParseResults object.  I switched my code to use t.asList() and things
are ok now.  If you'd like me to test your version, I'd be glad to,
otherwise I can wait until whenever that change makes it's way into a
release.

Jeff




More information about the Python-list mailing list