Lichen

tests/lambda.py

1027:dd0745ab8b8a
5 months ago Paul Boddie Reordered GCC arguments to prevent linking failures. Someone decided to change the GCC invocation or linking semantics at some point, meaning that libraries specified "too early" in the argument list no longer provide the symbols required by the program objects, whereas specifying them at the end of the argument list allows those symbols to be found and obtained.
     1 f = lambda x: (x, 1)     2      3 class C:     4     f = lambda x: (x, 2)     5      6 print f(123)            # (123, 1)     7      8 c = C()     9 print c.f               # __main__.C.$l0    10 print c.f(123)          # (123, 2)    11     12 c.f = f    13 print c.f(123)          # (123, 1)    14     15 C.f = f    16 c2 = C()    17 print c2.f(123)         # (123, 1)