how to pickle a lambda?

Alejandro Dubrovsky s328940 at student.uq.edu.au
Sun Apr 28 16:27:27 EDT 2002


hi,
i've got a class that defines something like the following:

def t(self,a,b):
	...

def h(self):
	self.thelambdafunctiontobepickled = lambda x: self.t(x,4)

is there any simple way of pickling that lambda function above so that
when i unpickle it will be set to the right function?

Thanks,
Alejandro



More information about the Python-list mailing list