Re: [Tutor] Is it possible to tell, from which class an method was inherited from

2011-01-20 Thread Peter Otten
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

Re: [Tutor] Is it possible to tell, from which class an method was inherited from

2011-01-19 Thread Jojo Mwebaze
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 > >

Re: [Tutor] Is it possible to tell, from which class an method was inherited from

2011-01-19 Thread Peter Otten
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 (

Re: [Tutor] Is it possible to tell, from which class an method was inherited from

2011-01-19 Thread Corey Richardson
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): > >

[Tutor] Is it possible to tell, from which class an method was inherited from

2011-01-19 Thread Jojo Mwebaze
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