mousem...@gmail.com wrote: > class material(object): > def __init__(self,density): > self.density=density > > airdensity=lambda T:100000/(287*T) > air=material(airdensity)
What exactly is your objection to using a named function here? def airdensity(T): return 100000/(287*T) air=material(airdensity) Surely that would solve your pickle problem *and* give you more meaningful tracebacks in your exceptions? -- Duncan Booth http://kupuguy.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list