def long2str(l):
if type(l) not in (types.IntType, types.LongType):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if l < <NUM_LIT:0>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>s = '<STR_LIT>'<EOL>while l:<EOL><INDENT>s = s + chr(l & <NUM_LIT:255>)<EOL>l >>= <NUM_LIT:8><EOL><DEDENT>return s<EOL>
Convert an integer to a string.