circuitpython/tests/basics/is_isnot.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
221 B
Python
Raw Normal View History

print(1 is 1)
print(1 is 2)
print(1 is not 1)
print(1 is not 2)
print([1, 2] is [1, 2])
a = [1, 2]
b = a
print(b is a)
# TODO: strings require special "is" handling, postponed
# until qstr refactor.
#print("a" is "a")