Re: has_method (solution found)
From: Gandalf (gandalf_at_geochemsource.com)
Date: 08/31/04
- Next message: Steve Holden: "Re: GUI Wizard: flow control?"
- Previous message: Gandalf: "Re: has_method"
- Next in thread: Eric Brunel: "Re: has_method (solution found)"
- Reply: Eric Brunel: "Re: has_method (solution found)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 31 Aug 2004 15:28:54 +0200 To: python-list@python.org
Somebody sent me a private e-mail.
It must be common for such silly questions that would just spam the
list. :-)
I'll write down the final solution anyway.
def getmethod(name):
methodList = [e for e in dir(self) if callable(getattr(self, e))]
if name in methodList:
return getattr(self,name)
else:
return None
Thanks for all.
Laci 2.0
- Next message: Steve Holden: "Re: GUI Wizard: flow control?"
- Previous message: Gandalf: "Re: has_method"
- Next in thread: Eric Brunel: "Re: has_method (solution found)"
- Reply: Eric Brunel: "Re: has_method (solution found)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|