summaryrefslogtreecommitdiffstats
path: root/Lib/xdrlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/xdrlib.py')
-rw-r--r--Lib/xdrlib.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/xdrlib.py b/Lib/xdrlib.py
index b56ffa5..f8c2c18 100644
--- a/Lib/xdrlib.py
+++ b/Lib/xdrlib.py
@@ -224,9 +224,7 @@ class Unpacker:
def unpack_list(self, unpack_item):
list = []
- while 1:
- x = self.unpack_uint()
- if x == 0: break
+ while (x := self.unpack_uint()) != 0:
if x != 1:
raise ConversionError('0 or 1 expected, got %r' % (x,))
item = unpack_item()