Re: stackless and pickling functions/lambdas

Richard Tew <[email protected]> Tue, 19 Aug 2014 08:25:51 +1200
Newsgroups gmane.comp.python.stackless
Message-ID <CAN=X-THC_3whDAX-jAL96M0th4GdagCLBdQ-PyiUV1Cg9vyNZA@mail.gmail.com>
Did you test it?  Lars, please, if you can test something with code,
you'll find out the answer faster than asking on the mailing list.

On 8/18/14, lars van Gemerden <[email protected]> wrote:
> Hi,
>
> I have a short question: does the ability for stackless to pickle tasklets
> also mean that it can pickle functions and lambda's?
>
> as in:
>
> import cPickle as pickle
>
> if __name__ == "__main__":
>     s = pickle.dumps(lambda x, y: x+y)
>     f = pickle.loads(s)
>     assert f(3,4) == 7
>
> Cheers, Lars
> --
> ====================================
> Lars van Gemerden
> [email protected]
> +31 6 26 88 55 39
> ====================================
>