diff options
author | Fred Drake <fdrake@acm.org> | 2000-12-12 23:11:42 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-12-12 23:11:42 (GMT) |
commit | 132dce22469f476f399d1bbc6d1cc2f7ba0110cc (patch) | |
tree | 4b0988e41b3b7d25d10c2a24fb18b07ff376f66d /Lib/test/test_unpack.py | |
parent | 63596aeb33c2837d7802449c8906349c9ea1998e (diff) | |
download | cpython-132dce22469f476f399d1bbc6d1cc2f7ba0110cc.zip cpython-132dce22469f476f399d1bbc6d1cc2f7ba0110cc.tar.gz cpython-132dce22469f476f399d1bbc6d1cc2f7ba0110cc.tar.bz2 |
Update the code to better reflect recommended style:
Use != instead of <> since <> is documented as "obsolescent".
Use "is" and "is not" when comparing with None or type objects.
Diffstat (limited to 'Lib/test/test_unpack.py')
-rw-r--r-- | Lib/test/test_unpack.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_unpack.py b/Lib/test/test_unpack.py index 25b94e9..b913b9e 100644 --- a/Lib/test/test_unpack.py +++ b/Lib/test/test_unpack.py @@ -16,35 +16,35 @@ c = -1 if verbose: print 'unpack tuple' a, b, c = t -if a <> 1 or b <> 2 or c <> 3: +if a != 1 or b != 2 or c != 3: raise TestFailed # unpack list if verbose: print 'unpack list' a, b, c = l -if a <> 4 or b <> 5 or c <> 6: +if a != 4 or b != 5 or c != 6: raise TestFailed # unpack implied tuple if verbose: print 'unpack implied tuple' a, b, c = 7, 8, 9 -if a <> 7 or b <> 8 or c <> 9: +if a != 7 or b != 8 or c != 9: raise TestFailed # unpack string... fun! if verbose: print 'unpack string' a, b, c = 'one' -if a <> 'o' or b <> 'n' or c <> 'e': +if a != 'o' or b != 'n' or c != 'e': raise TestFailed # unpack generic sequence if verbose: print 'unpack sequence' a, b, c = Seq() -if a <> 0 or b <> 1 or c <> 2: +if a != 0 or b != 1 or c != 2: raise TestFailed # single element unpacking, with extra syntax @@ -53,10 +53,10 @@ if verbose: st = (99,) sl = [100] a, = st -if a <> 99: +if a != 99: raise TestFailed b, = sl -if b <> 100: +if b != 100: raise TestFailed # now for some failures |