mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Killed the <> operator. You must now use !=.
Opportunistically also fixed one or two places where '<> None' should be 'is not None' and where 'type(x) <> y' should be 'not isinstance(x, y)'.
This commit is contained in:
parent
01c77c6628
commit
b053cd8f40
36 changed files with 171 additions and 178 deletions
|
@ -36,8 +36,8 @@ x = 1 \
|
|||
x = 0
|
||||
|
||||
# Ordinary integers
|
||||
0xff <> 255
|
||||
0377 <> 255
|
||||
0xff != 255
|
||||
0377 != 255
|
||||
2147483647 != 017777777777
|
||||
-2147483647-1 != 020000000000
|
||||
037777777777 != -1
|
||||
|
@ -146,10 +146,10 @@ if 0:
|
|||
def d22(a, b, c=1, d=2): pass
|
||||
def d01v(a=1, *restt, **restd): pass
|
||||
|
||||
(x, y) <> ({'a':1}, {'b':2})
|
||||
(x, y) != ({'a':1}, {'b':2})
|
||||
|
||||
# comparison
|
||||
if 1 < 1 > 1 == 1 >= 1 <= 1 <> 1 != 1 in 1 not in 1 is 1 is not 1: pass
|
||||
if 1 < 1 > 1 == 1 >= 1 <= 1 != 1 != 1 in 1 not in 1 is 1 is not 1: pass
|
||||
|
||||
# binary
|
||||
x = 1 & 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue