2018-07-12 | Paul Boddie | raw annotate files changeset graph | Support trailing data after attributes in objects, employed by float instances to store their double-precision numeric data which needs more space than single attributes on some systems. In order to initialise such instances statically, specific object types must be indicated instead of the generic __obj type. This then requires casting to __ref of direct references to objects. Added an underflow error. Added initial testing of floating point numbers. | trailing-data |
1 a = 4 2 3 def f(x): 4 # f.$l0 f.$l0.$l0 5 g = lambda y, x=x: lambda z, x=x, y=y: (x, y, z, a) 6 return g 7 8 print f # __main__.f 9 print f(1) # __main__.f.$l0 10 print f(1)(2) # __main__.f.$l0.$l0 11 12 result = f(1)(2)(3) 13 print result[0] 14 print result[1] 15 print result[2] 16 print result[3] 17 print result # (1, 2, 3, 4)