<s> class C ( object ) : <EOL> def __init__ ( self , n ) : <EOL> self . n = n <EOL> def __enter__ ( self ) : <EOL> print "<STR_LIT>" , self . n <EOL> return self . n <EOL> def __exit__ ( self , type , val , tb ) : <EOL> print "<STR_LIT>" , type , val , tb <EOL> def new_exit ( self , type , val , tb ) : <EOL> print "<STR_LIT>" , self , type , val , tb <EOL> def bad_exit ( type , val , tb ) : <EOL> print "<STR_LIT>" <EOL> c = C ( <NUM_LIT:1> ) <EOL> with c as n : <EOL> print n <EOL> print n <EOL> l = [ <NUM_LIT:0> ] <EOL> with C ( <NUM_LIT:2> ) as l [ <NUM_LIT:0> ] : <EOL> pass <EOL> print l <EOL> c = C ( <NUM_LIT:3> ) <EOL> with c as n : <EOL> C . __exit__ = new_exit <EOL> c . __exit__ = bad_exit <EOL> print n <EOL> print n </s>
