"Joel Goldstick" <joel.goldst...@gmail.com> wrote
def __getattr__(self, attr):
# Fake a __getstate__ method that resturns None
if attr == "__getstate__":
return lambda: None
why not "return None"?
Presumably the caller is expecting a function that he can call.
The lambda is such a function, but one which always returns
None.
lambda: None
is not the same as
None
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor