def convert_xor(tokens, local_dict, global_dict):
 result = []
 for (toknum, tokval) in tokens:
  if (toknum == OP):
   if (tokval == '^'):
    result.append((OP, '**'))
   else:
    result.append((toknum, tokval))
  else:
   result.append((toknum, tokval))
 return result

def convert_xor ( tokens , local_dict , global_dict ) : result = [ ] for ( toknum , tokval ) in tokens : if ( toknum == OP ) : if ( tokval == '^' ) : result . append ( ( OP , '**' ) ) else : result . append ( ( toknum , tokval ) ) else : result . append ( ( toknum , tokval ) ) return result
treats xor .