SyntaxError not honoured in list comprehension?
Mark Dickinson
dickinsm at gmail.com
Mon Jul 5 15:56:23 EDT 2010
On Jul 5, 7:12 pm, jmfauth <wxjmfa... at gmail.com> wrote:
> BTW, if I understand correctly the module tokenize import
> the module token. So your example becomes:
>
> >>> from cStringIO import StringIO
> >>> import tokenize
> >>> for tok in tokenize.generate_tokens(StringIO("print9.0").readline):
>
> print tokenize.tok_name[tok[0]], tok[1]
Ah yes; you're right. Thanks!
Mark
More information about the Python-list
mailing list