r1chardj0n3s / parse

Parse strings using a specification based on the Python format() syntax.
http://pypi.python.org/pypi/parse
MIT License
1.72k stars 101 forks source link

fixing issue 110 by using functor instead of inner function #111

Closed martinResearch closed 4 years ago

martinResearch commented 4 years ago

Fixing issue when pickling described here Pickle does not work with inner function . The solution proposed here is to use a functor. It would be good to add some unit tests to test that the parsers can be pickled.

martinResearch commented 4 years ago

I made the change for CHARS. I also added another functor to avoid the use of lambda functions that cannot be pickled either

martinResearch commented 4 years ago

Hi, is there anything left to do to in order to complete this pull request ?

r1chardj0n3s commented 4 years ago

Thanks for the change, I've just written a test though to make sure the fix is good.