E
Emmanuel
Hi,
I would like to know how to bound a method to a instance of a class.
One application would be to allow a change in a method after a reload :
module toto :
--------------
class toto:
def method(self):
(...)
main module :
--------------
import toto
a = toto.toto()
a.method() -> does something ...
reload (toto)
now a is not reloaded...
a.method = toto.toto().method
does not work, because a.method would be bounded to a new instance...
Thanks,
Emmanuel...
I would like to know how to bound a method to a instance of a class.
One application would be to allow a change in a method after a reload :
module toto :
--------------
class toto:
def method(self):
(...)
main module :
--------------
import toto
a = toto.toto()
a.method() -> does something ...
reload (toto)
now a is not reloaded...
a.method = toto.toto().method
does not work, because a.method would be bounded to a new instance...
Thanks,
Emmanuel...