Lichen

tests/class_names.py

338:61776a5a0e16
2016-12-07 Paul Boddie Associate constant name information with references so that structure members such as function instance default members can be generated statically, thus eliminating unnecessary structure initialisation in the translated code. Improved the determination of dynamic functions in the importer to consider only non-constant defaults.
     1 class C:     2     pass     3      4 def c():     5     return 456     6      7 def f():     8     return C()     9     10 print f()                       # 123    11     12 C = c    13     14 print f()                       # 456