Dennis Sweeney <sweeney.dennis...@gmail.com> added the comment:

In the future, please copy and paste the relevant code and errors as text. 
Images of code are harder for screen-readers for the visually impaired, harder 
to copy-and-paste to verify, and are more likely to be perceived as spam.

Your code is essentially this:

>>> i = 0
>>> i is 0
<stdin>:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
True

This warning isn't a "stub", it was intentionally added in GH-9642. The warning 
exists because comparing numbers with `is` is generally unsafe (numbers should 
be compared using `==` instead), and can lead to unpredictable results, 
especially if using a different Python implementation (e.g. PyPy or RustPython 
or Jython rather than CPython).

----------
nosy: +Dennis Sweeney

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46941>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to