Jojo Mwebaze wrote:
> Thanks guys for the responses,
>
> inspect.classify_class_attrs(klass)
>
> does the magic
Argh, undocumented functions. How did you find that gem?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription opt
Thanks guys for the responses,
inspect.classify_class_attrs(klass)
does the magic
Regards
On Wed, Jan 19, 2011 at 3:58 PM, Peter Otten <__pete...@web.de> wrote:
> Jojo Mwebaze wrote:
>
> > Is it possible to tell, from which class an method was inherited from.
> > take an example below
> >
Jojo Mwebaze wrote:
> 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 (
On 01/19/2011 03:55 AM, Jojo Mwebaze wrote:
> 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):
>
>
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