Batista, Facundo FBatista at uniFON.com.ar
Tue Aug 31 15:12:36 CEST 2004


#- Does anyone knows how to tell if an object has a method with a given
#- name? How can I access that method?

>>> class C:
        def mymeth(self):

>>> c = C()
>>> dir(c)
['__doc__', '__module__', 'mymeth']
>>> c.mymeth
<bound method C.mymeth of <__main__.C instance at 0x009ACBC0>>

.	Facundo

More information about the Python-list mailing list