Add methods to a class dynamically

Terence Way terry at
Sat Jun 7 00:22:27 CEST 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'

> 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