Adding methods to an object

Gabriele *darkbard* Farina darkbard at
Thu Oct 13 15:06:20 CEST 2005

Hi, there is a way to add methods to an object dynamically? I need to
do something like this. I remember python allowed this ...

class A(object):
 def do(s, m):
  print m

 def init(obj): =

class Test(object):

o = Test()

Now it gives me an error ... unbound method ...

tnx, gabriele

More information about the Python-list mailing list