How to wrap a class's methods?

Dave Benjamin ramen at lackingtalent.com
Thu Feb 17 16:14:54 EST 2005


Michael Spencer wrote:
> Grant Edwards wrote:
>>
>> Thanks.  The stuff provided by the "new" module is what I was
>> missing.
>>
> No magic in the 'new' module - new.instancemethod is just a synonym for 
> the method type:
> 
>  >>> import new, types
>  >>> new.instancemethod is types.MethodType
> True

(Assuming you're using Python 2.3 or newer)



More information about the Python-list mailing list