[Python-bugs-list] [ python-Bugs-505028 ] Super method search quirk
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 22 Mar 2002 14:27:29 -0800
Bugs item #505028, was opened at 2002-01-17 19: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: Guido van Rossum (gvanrossum)
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
----------------------------------------------------------------------
>Comment By: Neil Schemenauer (nascheme)
Date: 2002-03-22 22:27
Message:
Logged In: YES
user_id=35752
I agree. This looks like a bug with super().
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=505028&group_id=5470