dyn added methods dont know self?

moonseeker at my-deja.com moonseeker at my-deja.com
Wed Feb 2 05:04:28 EST 2000


Hi!

I want to add a method dynamically to an instance, how can I do this? I tried
with exec '...' in self.__dict__, but this method doesn't know the instance
reference 'self', so it would complain that it is called without an argument.
Is there any other method to add a method dynamically?

Thanks,
Mike


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list