2017-01-15 | Paul Boddie | file changeset files shortlog | Remove effectively duplicate references from the cached output. Such references are not employed elsewhere after being read from the cached data, and the original references employed elsewhere will have been updated in the cached data to feature non-deferred details. Thus, duplicate references are superfluous. |
paul@46 | 1 | class C: |
paul@46 | 2 | def __init__(self, x, y, z): |
paul@46 | 3 | self.x = x |
paul@46 | 4 | self.y = y |
paul@46 | 5 | self.z = z |
paul@46 | 6 | |
paul@46 | 7 | def c(self): |
paul@46 | 8 | return self.x |
paul@46 | 9 | |
paul@46 | 10 | class D(C): |
paul@46 | 11 | def d(self): |
paul@46 | 12 | return self.y |
paul@46 | 13 | |
paul@46 | 14 | class E(D): |
paul@46 | 15 | def c(self): |
paul@46 | 16 | return self.z |
paul@46 | 17 | |
paul@46 | 18 | c = C(1, 2, 3) |
paul@46 | 19 | d = D(1, 2, 3) |
paul@46 | 20 | e = E(1, 2, 3) |
paul@46 | 21 | |
paul@214 | 22 | print c.c() # 1 |
paul@214 | 23 | print d.c() # 1 |
paul@214 | 24 | print e.c() # 3 |
paul@214 | 25 | print d.d() # 2 |
paul@214 | 26 | print e.d() # 2 |