<s> """<STR_LIT>""" <EOL> import sys <EOL> import decimal <EOL> PY3K = sys . version_info >= ( <NUM_LIT:3> , <NUM_LIT:0> ) <EOL> def iter_dict ( dict_ ) : <EOL> if PY3K : <EOL> return dict_ . items ( ) <EOL> else : <EOL> return dict_ . iteritems ( ) <EOL> def to_str ( value ) : <EOL> if PY3K and isinstance ( value , bytes ) : <EOL> value = value . encode ( '<STR_LIT:utf-8>' , '<STR_LIT:replace>' ) <EOL> elif not PY3K and isinstance ( value , unicode ) : <EOL> value = value . encode ( '<STR_LIT:utf-8>' , '<STR_LIT:replace>' ) <EOL> return value <EOL> if PY3K : <EOL> NUM_TYPES = int , float , decimal . Decimal <EOL> else : <EOL> NUM_TYPES = int , long , float , decimal . Decimal </s>
