Method by name lookup

Fredrik Lundh fredrik at effbot.org
Thu Nov 2 20:29:22 CET 2000


Will Hartung wrote:
> I'm writing something that needs to get method functions from a class by
> name.

funcitem = getattr(instance, 'funcname', None)

</F>





More information about the Python-list mailing list