Gary Litvin added the comment:
I noticed it in IDLE 3.8. I installed 3.8 because it is a fairly
recent release described as "stable." Thanks to everyone for considering this.
At 03:41 AM 2/7/2021, you wrote:
>Dennis Sweeney added the comment:
>
>I think the strangeness i
Gary Litvin added the comment:
Thank you for your responses. I understand the difference between ==
and "is" and the intentional change in 3.8. My question is about what
seems to be inconsistent treatment in x is 'a' and if a is 'a': ...
At 12:49 AM 2/7
New submission from Gary Litvin :
>>> 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