[issue40491] Typo in SyntaxError produced by pegen for numeric literals

Shantanu report at bugs.python.org
Sun May 3 23:06:24 EDT 2020


New submission from Shantanu <hauntsaninja at gmail.com>:

```
~ λ python3.9
Python 3.9.0a6+ (heads/master:c95e691, May  3 2020, 19:57:46) 
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> ast.parse("1_2", feature_version=(3, 5))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/shantanu/.pyenv/versions/3.9-dev/lib/python3.9/ast.py", line 50, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 1
    1_2
    ^
SyntaxError: Underscores in numeric literals are only supportedin Python 3.6 and greater
```

----------
messages: 368006
nosy: hauntsaninja
priority: normal
severity: normal
status: open
title: Typo in SyntaxError produced by pegen for numeric literals

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40491>
_______________________________________


More information about the Python-bugs-list mailing list