replace a method in class: how?

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Tue Jun 27 00:16:56 EDT 2006


Maric Michaud a écrit :
> Le mardi 27 juin 2006 05:05, Bruno Desthuilliers a écrit :
> 
>>import types
>>t.update = types.MethodType(another_update)
> 
> 
> This works with :
> 
>  t.update = types.MethodType(another_update, t)

oops ! too fast on the send button :(
And thanks for the correction.



More information about the Python-list mailing list