[Tutor] Is it possible to tell, from which class an method was inherited from
Jojo Mwebaze
jojo.mwebaze at gmail.com
Wed Jan 19 09:55:35 CET 2011
Is it possible to tell, from which class an method was inherited from. take
an example below
class A:
def foo():
pass
class B(A):
def boo(A):
pass
class C(B):
def coo()
pass
class D(C):
def doo()
pass
>>> dir (D)
['__doc__', '__module__', 'boo', 'coo', 'doo', 'foo']
Is there any method to tell me form which classes boo, coo, foo where
inherited from?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110119/231e21e7/attachment.html>
More information about the Tutor
mailing list