Add methods to a class dynamically

Terence Way terry at wayforward.net
Fri Jun 6 18:22:27 EDT 2003


On Fri, 06 Jun 2003 11:28:54 -0400, Hoang Do wrote:

I think it works :-) replace print %s with print '%s'
the global name 'a' it's looking for is the a in 'print a'

Cheers!
> I am having trouble invoking the created method.  The function addition
> goes fine but invoking it gives an error.  Here is some simple code:




More information about the Python-list mailing list