Nov-11-2022, 05:24 AM
how to silence this warning?
Output:lt1a/forums/2 /home/forums 5> box foo.py
+----<foo.py>---------------------+
| def foox(v): |
| if v is 1: |
| print('v is 1',repr(v)) |
| if v == 1: |
| print('v == 1',repr(v)) |
| return |
| foox(True) |
| foox(1) |
+---------------------------------+
lt1a/forums/2 /home/forums 6> python3.8 foo.py
foo.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="?
if v is 1:
v == 1 True
v is 1 1
v == 1 1
lt1a/forums/2 /home/forums 7>
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.