Commits

Anonymous committed 66bee40

isdigit bug

  • Participants
  • Parent commits e9adaad

Comments (0)

Files changed (1)

                 # make [ignore,ignore,a,b,c,d] into [[a,b],[c,d]]
                 av = zip(*[av[2:][x::2] for x in (0, 1)]) 
                 # save as attr-value dict, convert numbers into ints
-                tmp['words'][av[1]] = dict(map(lambda x: (x[0], x[1].isdigit()
-                    and int(x[1]) or x[1]), av))
+                tmp['words'][av[1]] = dict(map(lambda x: (x[0], x[1].isdigit() and int(x[1]) or x[1]), av))
             state = 3
         elif state == 3:
             # skip over parse tree