<s> """<STR_LIT>""" <EOL> _builtin_open = open <EOL> class newopen ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , fname , mode = "<STR_LIT:r>" , encoding = "<STR_LIT:utf-8>" ) : <EOL> self . f = _builtin_open ( fname , mode ) <EOL> self . enc = encoding <EOL> def write ( self , s ) : <EOL> return self . f . write ( s . encode ( self . enc ) ) <EOL> def read ( self , size = - <NUM_LIT:1> ) : <EOL> return self . f . read ( size ) . decode ( self . enc ) <EOL> def close ( self ) : <EOL> return self . f . close ( ) <EOL> def __enter__ ( self ) : <EOL> return self <EOL> def __exit__ ( self , etype , value , traceback ) : <EOL> self . f . close ( ) </s>
