[New-bugs-announce] [issue43151] is with literals in 3.8 release

Gary Litvin report at bugs.python.org
Sat Feb 6 23:40:13 EST 2021


New submission from Gary Litvin <litvin at skylit.com>:

>>> x = 'a'
>>> x is 'a'
True
>>> if x is 'a':
        print(x)

SyntaxError: "is" with a literal. Did you mean "=="?

How come?

----------
messages: 386575
nosy: garylitvin
priority: normal
severity: normal
status: open
title: is with literals in 3.8 release
versions: Python 3.8, Python 3.9

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


More information about the New-bugs-announce mailing list