dynamic function add to an instance of a class

News123 news1234 at free.fr
Thu Apr 29 05:05:10 EDT 2010


Peter Otten wrote:
> News123 wrote:

>>>
>> The drawback would be, that
>> b = A(123)
>> b.f()
>> would still be called with a as bound object.
> 
> There is no b.f until you explicitly assign it with
> 
> b.f = f

you are sooo right.
My fault.



More information about the Python-list mailing list