<s> from __future__ import print_function <EOL> __class__ = "<STR_LIT>" <EOL> class ClassWithUnderClassClosure : <EOL> def g ( self ) : <EOL> def h ( ) : <EOL> print ( "<STR_LIT>" , __class__ ) <EOL> h ( ) <EOL> try : <EOL> print ( "<STR_LIT>" , super ( ) ) <EOL> except Exception as e : <EOL> print ( "<STR_LIT>" , repr ( e ) ) <EOL> print ( "<STR_LIT>" ) <EOL> ClassWithUnderClassClosure ( ) . g ( ) <EOL> class ClassWithoutUnderClassClosure : <EOL> def g ( self ) : <EOL> __class__ = "<STR_LIT>" <EOL> print ( __class__ ) <EOL> try : <EOL> print ( "<STR_LIT>" , super ( ) ) <EOL> except Exception as e : <EOL> print ( "<STR_LIT>" , repr ( e ) ) <EOL> ClassWithoutUnderClassClosure ( ) . g ( ) <EOL> __class__ = "<STR_LIT>" <EOL> def deco ( C ) : <EOL> print ( "<STR_LIT>" , repr ( C ) ) <EOL> class D ( C ) : <EOL> pass <EOL> return D <EOL> @ deco <EOL> class X : <EOL> __class__ = "<STR_LIT>" <EOL> def f1 ( self ) : <EOL> print ( "<STR_LIT>" , locals ( ) ) <EOL> try : <EOL> print ( "<STR_LIT>" , __class__ ) <EOL> except Exception as e : <EOL> print ( "<STR_LIT>" , repr ( e ) ) <EOL> def f2 ( self ) : <EOL> print ( "<STR_LIT>" , locals ( ) ) <EOL> def f4 ( self ) : <EOL> print ( "<STR_LIT>" , self ) <EOL> self = X ( ) <EOL> print ( "<STR_LIT>" , self ) <EOL> try : <EOL> print ( "<STR_LIT>" , super ( ) ) <EOL> print ( "<STR_LIT>" , super ( ) . __self__ ) <EOL> except TypeError : <EOL> import sys <EOL> assert sys . version < ( <NUM_LIT:3> , ) <EOL> f5 = lambda x : __class__ <EOL> def f6 ( self_by_another_name ) : <EOL> try : <EOL> print ( "<STR_LIT>" , super ( ) ) <EOL> except TypeError : <EOL> import sys <EOL> assert sys . version < ( <NUM_LIT:3> , ) <EOL> def f7 ( self ) : <EOL> try : <EOL> yield super ( ) <EOL> except TypeError : <EOL> import sys <EOL> assert sys . version < ( <NUM_LIT:3> , ) <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" , __class__ ) <EOL> f2 ( <NUM_LIT:2> ) <EOL> print ( "<STR_LIT>" ) <EOL> del __class__ <EOL> x = X ( ) <EOL> x . f1 ( ) <EOL> x . f2 ( ) <EOL> x . f4 ( ) <EOL> print ( "<STR_LIT>" , x . f5 ( ) ) <EOL> x . f6 ( ) <EOL> print ( "<STR_LIT>" , list ( x . f7 ( ) ) ) </s>
