Attaching functions to objects as methods

tac-tics tactics40 at gmail.com
Fri Jul 7 21:01:04 EDT 2006


Experimenting, I found that

>>> x.fun = lambda: fun(x)

works as well. Any comments on this way?




More information about the Python-list mailing list