<s> """<STR_LIT>""" <EOL> import sys <EOL> PY2 = sys . version_info [ <NUM_LIT:0> ] == <NUM_LIT:2> <EOL> _identity = lambda x : x <EOL> import sys <EOL> import operator <EOL> import functools <EOL> try : <EOL> import builtins <EOL> except ImportError : <EOL> import __builtin__ as builtins <EOL> if PY2 : <EOL> unichr = unichr <EOL> text_type = unicode <EOL> string_types = ( str , unicode ) <EOL> integer_types = ( int , long ) <EOL> int_to_byte = chr <EOL> exec ( '<STR_LIT>' ) <EOL> from itertools import imap , izip , ifilter <EOL> range_type = xrange <EOL> from StringIO import StringIO <EOL> from cStringIO import StringIO as BytesIO <EOL> else : <EOL> unichr = chr <EOL> text_type = str <EOL> string_types = ( str , ) <EOL> integer_types = ( int , ) <EOL> def reraise ( tp , value , tb = None ) : <EOL> if value . __traceback__ is not tb : <EOL> raise value . with_traceback ( tb ) <EOL> raise value <EOL> imap = map <EOL> izip = zip <EOL> ifilter = filter <EOL> range_type = range <EOL> from io import StringIO , BytesIO <EOL> def to_bytes ( s , enc = '<STR_LIT:utf8>' ) : <EOL> if s is None : <EOL> return None <EOL> return s . encode ( enc ) if isinstance ( s , text_type ) else bytes ( s ) <EOL> def to_unicode ( s , enc = '<STR_LIT:utf8>' , err = '<STR_LIT:strict>' ) : <EOL> if s is None : <EOL> return None <EOL> if isinstance ( s , bytes ) : <EOL> return s . decode ( enc , err ) <EOL> else : <EOL> return text_type ( s ) <EOL> to_native = to_bytes if PY2 else to_unicode </s>
