2020-07-16 | Paul Boddie | file changeset files shortlog | Fixed int limit macros by actually using the size of the int type. For wider types such as long, which may be usable on 64-bit platforms in place of int, 1L would need to be used instead of 1 in the calculation. An abstract native integer type might be introduced here and to the native library to allow wider types if appropriate. |
paul@840 | 1 | class C: |
paul@840 | 2 | def __init__(self, x, y, z): |
paul@840 | 3 | self.x = x |
paul@840 | 4 | self.y = y |
paul@840 | 5 | self.z = z |
paul@840 | 6 | |
paul@840 | 7 | def c(self): |
paul@840 | 8 | return self.x |
paul@840 | 9 | |
paul@840 | 10 | c = C(1, 2, 3) |
paul@840 | 11 | print c.c() # 1 |
paul@840 | 12 | print C.c() # bad |