importing a method

Flavio fccoelho at gmail.com
Mon Nov 28 10:50:55 EST 2005


Addendum to my last reply:

although the New Method is deprecated,

new.instancemethod (from Antoon's message) can be replaced by

from types import MethodType

f.show = MethodType(show,f)

and every thing still works.




More information about the Python-list mailing list