[Python-bugs-list] [ python-Bugs-505028 ] Super method search quirk

noreply@sourceforge.net noreply@sourceforge.net
Thu, 17 Jan 2002 11:14:30 -0800


Bugs item #505028, was opened at 2002-01-17 11:14
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=505028&group_id=5470

Category: Type/class unification
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Greg Chapman (glchapman)
Assigned to: Nobody/Anonymous (nobody)
Summary: Super method search quirk

Initial Comment:
I think the following qualifies as a bug; I think the 
call to super(C, self).m() should cause an exception 
(the super_getattro search should not find the m in A 
if an m is defined in B):

>>> class A(object):
...     def m(self):
...         print 'A'
...
>>> class B(A):
...     m = property(lambda self: 'B')
...
>>> class C(B):
...     def m(self):
...         super(C, self).m()
...         print 'C'
...
>>> c = C()
>>> c.meth()
A
C



----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=505028&group_id=5470