Lichen

tests/exceptions.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 # Raise an instance of TypeError.     2      3 try:     4     raise TypeError()     5 except TypeError, exc:     6     print "Handled", exc     7      8 # Raise TypeError, causing instantiation.     9     10 try:    11     raise TypeError    12 except TypeError, exc:    13     print "Handled", exc