N
noro
Is it possible to do the following:
for a certain class:
----------------------------
class C:
def func1(self):
pass
def func2(self):
pass
def func4(self):
pass
obj=C()
----------------------------
by some way create a dictionary that look somthing like that:
d= {'function one': <reference to C.func1()>, \
'function two': <reference to C.func2()>, \
'function three': <reference to C.func3()>}
and so i could access every method of instances of C, such as obj with
sometiing like:
(i know that this syntax wont work )
obj.(d['function one'])
obj.(d['function two'])
etc..
thanks
for a certain class:
----------------------------
class C:
def func1(self):
pass
def func2(self):
pass
def func4(self):
pass
obj=C()
----------------------------
by some way create a dictionary that look somthing like that:
d= {'function one': <reference to C.func1()>, \
'function two': <reference to C.func2()>, \
'function three': <reference to C.func3()>}
and so i could access every method of instances of C, such as obj with
sometiing like:
(i know that this syntax wont work )
obj.(d['function one'])
obj.(d['function two'])
etc..
thanks