This commit is contained in:
Andrew Resch 2009-05-21 19:33:12 +00:00
parent d45e2de1c9
commit fa9d39c5fb
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ def simple_eval(source):
taken from http://effbot.org/zone/simple-iterator-parser.htm""" taken from http://effbot.org/zone/simple-iterator-parser.htm"""
src = cStringIO.StringIO(source).readline src = cStringIO.StringIO(source).readline
src = tokenize.generate_tokens(src) src = tokenize.generate_tokens(src)
src = (token for token in src if token[0] is not tokenize.NL37) src = (token for token in src if token[0] is not tokenize.NL)
res = atom(src.next, src.next()) res = atom(src.next, src.next())
if src.next()[0] is not tokenize.ENDMARKER: if src.next()[0] is not tokenize.ENDMARKER:
raise SyntaxError("bogus data after expression") raise SyntaxError("bogus data after expression")