[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-04-13 Thread Nevada Sanchez
Changes by Nevada Sanchez <m...@nevadasanchez.com>: -- pull_requests: +1257 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29869> ___

[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-03-22 Thread Nevada Sanchez
Nevada Sanchez added the comment: Good point. Updated. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29869> ___ ___ Python-bugs-

[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-03-22 Thread Nevada Sanchez
Nevada Sanchez added the comment: Thanks, it seems I misspoke. Glad I tested it! -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-03-22 Thread Nevada Sanchez
Nevada Sanchez added the comment: The existing regular expressions weren't actually strict enough as is, so I made them even more correct. In particular, we must have at least one digit following `0[xXbBoO]` and must be before any underscores. I have a small set of test cases to examine

[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-03-21 Thread Nevada Sanchez
Changes by Nevada Sanchez <m...@nevadasanchez.com>: -- pull_requests: +668 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29869> ___

[issue29869] Underscores in numeric literals not supported in lib2to3.

2017-03-21 Thread Nevada Sanchez
New submission from Nevada Sanchez: The following should work in Python 3.6 ``` from lib2to3.pgen2 import driver from lib2to3 import pytree from lib2to3 import pygram _GRAMMAR_FOR_PY3 = pygram.python_grammar_no_print_statement.copy() parser_driver = driver.Driver(_GRAMMAR_FOR_PY3, convert