summaryrefslogtreecommitdiffstats
path: root/Lib/xdrlib.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-12-12 23:20:45 (GMT)
committerFred Drake <fdrake@acm.org>2000-12-12 23:20:45 (GMT)
commit8152d32375c40bba9ccbe43b780ebe96d9617781 (patch)
treef10aba5ba6f1e3064b26d2edfd6fffb45378245d /Lib/xdrlib.py
parentc140131995c67b1cd001b5c27e0095c53b1204b4 (diff)
downloadcpython-8152d32375c40bba9ccbe43b780ebe96d9617781.zip
cpython-8152d32375c40bba9ccbe43b780ebe96d9617781.tar.gz
cpython-8152d32375c40bba9ccbe43b780ebe96d9617781.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/xdrlib.py')
-rw-r--r--Lib/xdrlib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/xdrlib.py b/Lib/xdrlib.py
index 290d92e..c97975d 100644
--- a/Lib/xdrlib.py
+++ b/Lib/xdrlib.py
@@ -95,7 +95,7 @@ class Packer:
self.pack_uint(0)
def pack_farray(self, n, list, pack_item):
- if len(list) <> n:
+ if len(list) != n:
raise ValueError, 'wrong array size'
for item in list:
pack_item(item)
@@ -204,7 +204,7 @@ class Unpacker:
while 1:
x = self.unpack_uint()
if x == 0: break
- if x <> 1:
+ if x != 1:
raise ConversionError, '0 or 1 expected, got ' + `x`
item = unpack_item()
list.append(item)