<s> from __future__ import print_function <EOL> def f ( o , msg ) : <EOL> print ( msg ) <EOL> return o <EOL> class C ( object ) : <EOL> def write ( self , s ) : <EOL> print ( "<STR_LIT>" , repr ( s ) ) <EOL> c = C ( ) <EOL> c2 = C ( ) <EOL> def write2 ( s ) : <EOL> print ( "<STR_LIT>" , repr ( s ) ) <EOL> c . write = write2 <EOL> l = [ c , c2 ] <EOL> print ( f ( <NUM_LIT:1> , "<STR_LIT>" ) , file = f ( l [ <NUM_LIT:0> ] , "<STR_LIT>" ) ) <EOL> print ( f ( <NUM_LIT:2> , "<STR_LIT>" ) , file = l [ <NUM_LIT:0> ] ) <EOL> print ( hasattr ( c , "<STR_LIT>" ) ) <EOL> print ( hasattr ( c2 , "<STR_LIT>" ) ) <EOL> print ( f ( <NUM_LIT:3> , <NUM_LIT:3> ) , file = l [ <NUM_LIT:1> ] ) <EOL> print ( hasattr ( c2 , "<STR_LIT>" ) ) <EOL> print ( f ( <NUM_LIT:4> , <NUM_LIT:4> ) , file = l [ <NUM_LIT:0> ] ) <EOL> print ( hasattr ( c , "<STR_LIT>" ) ) <EOL> import sys <EOL> ss_1 = sys . stdout . softspace <EOL> print ( <NUM_LIT:1> , end = "<STR_LIT>" ) <EOL> ss_2 = sys . stdout . softspace <EOL> print ( ) <EOL> ss_3 = sys . stdout . softspace <EOL> print ( ss_1 , ss_2 , ss_3 ) <EOL> print ( hasattr ( c , "<STR_LIT>" ) , file = c ) <EOL> print ( ) <EOL> class D ( object ) : <EOL> def __str__ ( self ) : <EOL> return <NUM_LIT:1> <EOL> try : <EOL> print ( D ( ) , file = c ) <EOL> assert <NUM_LIT:0> , "<STR_LIT>" <EOL> except TypeError : <EOL> pass <EOL> for i in xrange ( <NUM_LIT:10> ) : <EOL> print ( ) <EOL> exec """<STR_LIT>""" <EOL> eval ( "<STR_LIT>" ) <EOL> exec compile ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , dont_inherit = True ) </s>
