diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-06-08 23:52:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-08 23:52:23 (GMT) |
commit | eeefa7f6c0cc64bc74c3b96a0ebbff1a2b9d3199 (patch) | |
tree | b072ce13737a6b36dcc77e6ea7e0bc295a52adb2 /Lib/test/test_compile.py | |
parent | 2cfe0e7061e9a2113e56e44a3e0c3f824cbc65db (diff) | |
download | cpython-eeefa7f6c0cc64bc74c3b96a0ebbff1a2b9d3199.zip cpython-eeefa7f6c0cc64bc74c3b96a0ebbff1a2b9d3199.tar.gz cpython-eeefa7f6c0cc64bc74c3b96a0ebbff1a2b9d3199.tar.bz2 |
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>
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r-- | Lib/test/test_compile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index d40347c..ea8ae22 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -162,7 +162,7 @@ if 1: for arg in ["077787", "0xj", "0x.", "0e", "090000000000000", "080000000000000", "000000000000009", "000000000000008", "0b42", "0BADCAFE", "0o123456789", "0b1.1", "0o4.2", - "0b101j2", "0o153j2", "0b100e1", "0o777e1", "0777", + "0b101j", "0o153j", "0b100e1", "0o777e1", "0777", "000777", "000000000000007"]: self.assertRaises(SyntaxError, eval, arg) |