[New-bugs-announce] [issue29869] Underscores in numeric literals not supported in lib2to3.

Nevada Sanchez report at bugs.python.org
Tue Mar 21 20:12:25 EDT 2017


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=pytree.convert)
tree = parser_driver.parse_string('100_1\n', debug=False)
```

----------
components: 2to3 (2.x to 3.x conversion tool)
messages: 289951
nosy: nevsan
priority: normal
severity: normal
status: open
title: Underscores in numeric literals not supported in lib2to3.
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29869>
_______________________________________


More information about the New-bugs-announce mailing list