2019-02-04 | Paul Boddie | file changeset files shortlog | Optimised __BOOL to test for integers and to return int values directly. For other value types, __VALUE need not be called once integers have been excluded, and so the attrvalue member can be accessed directly. |
paul@2 | 1 | from B import C, g |
paul@2 | 2 | |
paul@2 | 3 | class D(C): |
paul@2 | 4 | d = 3 |
paul@270 | 5 | def m(self): |
paul@270 | 6 | return self.d |
paul@2 | 7 | |
paul@2 | 8 | def f(x): |
paul@270 | 9 | return x.m() |
paul@2 | 10 | |
paul@2 | 11 | def h(x): |
paul@2 | 12 | return g(x) |