diff options
| author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-15 00:31:28 +0200 |
|---|---|---|
| committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-15 00:32:09 +0200 |
| commit | 8bc96471f0219b9d3f24ae879f60b509927e1df4 (patch) | |
| tree | b14f198545074bc505b452e617abf2a643b1d84d /tests | |
| parent | 8eec8bcad95d5e60485635a2dbfd97886698d954 (diff) | |
Implement "is" and "is not" operators.
So far, don't work for strings as expected.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/basics/tests/is-isnot.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/basics/tests/is-isnot.py b/tests/basics/tests/is-isnot.py new file mode 100644 index 000000000..990190aa4 --- /dev/null +++ b/tests/basics/tests/is-isnot.py @@ -0,0 +1,14 @@ +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") |
