[issue46820] SyntaxError on `1not in...`
Patrick Reader
report at bugs.python.org
Mon Feb 21 12:50:04 EST 2022
New submission from Patrick Reader <pxeger at protonmail.com>:
The following code gives a SyntaxError in 3.10, but used to work fine before (I have tested it in 2.7, 3.8, 3.9):
1not in [2, 3]
It seems to be only the `not in` syntax which is affected; all other keywords still work correctly:
1in [2, 3]
1or 2
1and 2
1if 1else 1
1is 1
I know this syntax is deprecated in 3.10 (bpo43833), but it still needs to work for now, so that old code written like this can keep working.
----------
components: Parser
messages: 413664
nosy: lys.nikolaou, pablogsal, pxeger
priority: normal
severity: normal
status: open
title: SyntaxError on `1not in...`
type: behavior
versions: Python 3.10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46820>
_______________________________________
More information about the Python-bugs-list
mailing list