<s> import sys <EOL> PY3 = sys . version_info [ <NUM_LIT:0> ] == <NUM_LIT:3> <EOL> if PY3 : <EOL> string_types = str , <EOL> integer_types = int , <EOL> class_types = type , <EOL> text_type = str <EOL> binary_type = bytes <EOL> MAXSIZE = sys . maxsize <EOL> def bytes_to_str ( b ) : <EOL> if isinstance ( b , text_type ) : <EOL> return b <EOL> return str ( b , '<STR_LIT:utf8>' ) <EOL> def str_to_bytes ( s ) : <EOL> if isinstance ( s , bytes ) : <EOL> return s <EOL> return s . encode ( '<STR_LIT:utf8>' ) <EOL> import urllib . parse <EOL> unquote_plus = urllib . parse . unquote_plus <EOL> else : <EOL> import types <EOL> string_types = basestring , <EOL> integer_types = ( int , long ) <EOL> class_types = ( type , types . ClassType ) <EOL> text_type = unicode <EOL> binary_type = str <EOL> if sys . platform == "<STR_LIT>" : <EOL> MAXSIZE = int ( ( <NUM_LIT:1> << <NUM_LIT> ) - <NUM_LIT:1> ) <EOL> else : <EOL> class X ( object ) : <EOL> def __len__ ( self ) : <EOL> return <NUM_LIT:1> << <NUM_LIT> <EOL> try : <EOL> len ( X ( ) ) <EOL> except OverflowError : <EOL> MAXSIZE = int ( ( <NUM_LIT:1> << <NUM_LIT> ) - <NUM_LIT:1> ) <EOL> else : <EOL> MAXSIZE = int ( ( <NUM_LIT:1> << <NUM_LIT> ) - <NUM_LIT:1> ) <EOL> del X <EOL> def bytes_to_str ( s ) : <EOL> if isinstance ( s , unicode ) : <EOL> return s . encode ( '<STR_LIT:utf-8>' ) <EOL> return s <EOL> def str_to_bytes ( s ) : <EOL> if isinstance ( s , unicode ) : <EOL> return s . encode ( '<STR_LIT:utf8>' ) <EOL> return s <EOL> import urllib <EOL> unquote_plus = urllib . unquote_plus </s>
