-
-
Notifications
You must be signed in to change notification settings - Fork 655
Open
Labels
Description
class P(object):
@cached_method
def blub(self):
print('called P.blub')
return 3
class Q(P):
def blub(self):
print('called Q.blub')
super(Q, self).blub()
return 7
p = P()
q = Q()
print p.blub()
print p.blub()
print '---'
print q.blub()
print q.blub()
results in
called P.blub
3
3
---
called Q.blub
called P.blub
7
3
The last line should clearly be the output 7
again (and not the 3
of the base class).
CC: @orlitzky
Component: misc
Issue created by migration from https://trac.sagemath.org/ticket/21281