Stefan Behnel added the comment:

Nice one. While reimplementing it for Cython, I noticed that the grammar 
described in the PEP isn't exactly as it's implemented, though. The grammar says

    digit (["_"] digit)*

whereas the latest patch (v4) says

    `digit` (`digit` | "_")*

and also implements it that way. The former doesn't allow underscores at the 
end of a literal.

And the regexes in tokenize.py seem happy to accept "0x___", for example. Is 
that intended?

----------
nosy: +scoder

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26331>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to