Method by name lookup

Fredrik Lundh fredrik at effbot.org
Thu Nov 2 14:29:22 EST 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