def int_to_Integer(s):
 from tokenize import generate_tokens, untokenize, NUMBER, NAME, OP
 from sympy.core.compatibility import StringIO
 def _is_int(num):
  '\n        Returns true if string value num (with token NUMBER) represents an integer.\n        '
  if (('.' in num) or ('j' in num.lower()) or ('e' in num.lower())):
   return False
  return True
 result = []
 g = generate_tokens(StringIO(s).readline)
 for (toknum, tokval, _, _, _) in g:
  if ((toknum == NUMBER) and _is_int(tokval)):
   result.extend([(NAME, 'Integer'), (OP, '('), (NUMBER, tokval), (OP, ')')])
  else:
   result.append((toknum, tokval))
 return untokenize(result)

def int_to_Integer ( s ) : from tokenize import generate_tokens , untokenize , NUMBER , NAME , OP from sympy . core . compatibility import StringIO def _is_int ( num ) : if ( ( '.' in num ) or ( 'j' in num . lower ( ) ) or ( 'e' in num . lower ( ) ) ) : return False return True result = [ ] g = generate_tokens ( StringIO ( s ) . readline ) for ( toknum , tokval , _ , _ , _ ) in g : if ( ( toknum == NUMBER ) and _is_int ( tokval ) ) : result . extend ( [ ( NAME , 'Integer' ) , ( OP , '(' ) , ( NUMBER , tokval ) , ( OP , ')' ) ] ) else : result . append ( ( toknum , tokval ) ) return untokenize ( result )
wrap integer literals with integer .