diff options
author | Guido van Rossum <guido@python.org> | 2006-08-24 03:53:23 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2006-08-24 03:53:23 (GMT) |
commit | b053cd8f40dd19985b16f50661640dcefb69888f (patch) | |
tree | 88e1c2ce636a6df402a97c51ea9067a46735120a /Lib/test/test_grammar.py | |
parent | 01c77c66289f8e9c8d15b8da623fae4014ec2edb (diff) | |
download | cpython-b053cd8f40dd19985b16f50661640dcefb69888f.zip cpython-b053cd8f40dd19985b16f50661640dcefb69888f.tar.gz cpython-b053cd8f40dd19985b16f50661640dcefb69888f.tar.bz2 |
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)'.
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r-- | Lib/test/test_grammar.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 458bfa2..0ce43dc 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -412,7 +412,7 @@ def test_break_continue_loop(extra_burning_oil = 1, count=0): continue except: raise - if count > 2 or big_hippo <> 1: + if count > 2 or big_hippo != 1: print "continue then break in try/except in loop broken!" test_break_continue_loop() @@ -586,12 +586,11 @@ if 1 and 1 or 1 and 1 and 1 or not 1 and 1: pass print 'comparison' ### comparison: expr (comp_op expr)* -### comp_op: '<'|'>'|'=='|'>='|'<='|'<>'|'!='|'in'|'not' 'in'|'is'|'is' 'not' +### comp_op: '<'|'>'|'=='|'>='|'<='|'!='|'in'|'not' 'in'|'is'|'is' 'not' if 1: pass x = (1 == 1) if 1 == 1: pass if 1 != 1: pass -if 1 <> 1: pass if 1 < 1: pass if 1 > 1: pass if 1 <= 1: pass @@ -600,7 +599,7 @@ if 1 is 1: pass if 1 is not 1: pass if 1 in (): pass if 1 not in (): pass -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 in 1 not in 1 is 1 is not 1: pass print 'binary mask ops' x = 1 & 1 |