I have a simple class
class hello:
def world(self):
return 'hello'
def test(self,arg):
return self.arg
When I want to do is:
hello.test('world')
'hello'i.e. pass the method name as an argument. How should I do this?
Thanks
Colin
Tweet |
|
Diez B. Roggisch | at Feb 3, 2005 at 3:56 pm | ⇧ | ![]() |
Diez B. Roggisch | at Feb 3, 2005 at 4:02 pm | ⇧ | ![]() |
Duncan Booth | at Feb 3, 2005 at 4:11 pm | ⇧ | ![]() |
Diez B. Roggisch | at Feb 3, 2005 at 8:30 pm | ⇧ | ![]() |
Jeremy Bowers | at Feb 3, 2005 at 7:28 pm | ⇧ | ![]() |
C Gillespie | at Feb 4, 2005 at 9:23 am | ⇧ | ![]() |
view | thread | post |
group | python-list |
categories | python |
posted | Feb 3, '05 at 3:48p |
active | Feb 4, '05 at 9:23a |
posts | 7 |
users | 4 |
website | python.org |
site design / logo © 2022 Grokbase