Get bound method by name

Johannes Bauer dfnsonfsduifb at
Tue Mar 3 12:12:24 CET 2009

Hello group,

I'm looking for a Python function but have forgotten it's name.
Essentially what I want is:

class Foo():
	def bar(self):

x = Foo()
y = x.MAGIC("bar")
<bound method of <__main__.Foo instance at 0xb7e11fcc>>

So the question is: How is the magic function called which returns me
the bound method of a class instance by its name? I know there was a way
but just can't remember...

Thanks in advance,
Kind regards,

"Meine Gegenklage gegen dich lautet dann auf bewusste Verlogenheit,
verlästerung von Gott, Bibel und mir und bewusster Blasphemie."
         -- Prophet und Visionär Hans Joss aka HJP in de.sci.physik
                         <48d8bf1d$0$7510$5402220f at>

More information about the Python-list mailing list