]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-43833: Emit warnings for numeric literals followed by keyword (GH-25466)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 8 Jun 2021 23:52:23 +0000 (16:52 -0700)
committerGitHub <noreply@github.com>
Tue, 8 Jun 2021 23:52:23 +0000 (16:52 -0700)
commiteeefa7f6c0cc64bc74c3b96a0ebbff1a2b9d3199
treeb072ce13737a6b36dcc77e6ea7e0bc295a52adb2
parent2cfe0e7061e9a2113e56e44a3e0c3f824cbc65db
bpo-43833: Emit warnings for numeric literals followed by keyword (GH-25466)

Emit a deprecation warning if the numeric literal is immediately followed by
one of keywords: and, else, for, if, in, is, or. Raise a syntax error with
more informative message if it is immediately followed by other keyword or
identifier.

Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 2ea6d890281c415e0a2f00e63526e592da8ce3d9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Doc/whatsnew/3.10.rst
Lib/test/test_compile.py
Lib/test/test_grammar.py
Misc/NEWS.d/next/Core and Builtins/2021-04-18-18-07-33.bpo-43833.oChkCi.rst [new file with mode: 0644]
Parser/tokenizer.c