We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12ce5d1 commit a890629Copy full SHA for a890629
1 file changed
serdepa/serdepa.py
@@ -332,12 +332,13 @@ def serialized_size(self):
332
def deserialize(self, value, pos, length=None):
333
if length is None:
334
raise AttributeError("Unknown length.")
335
- del self[:] # clear the internal list - deserialization will overwrite anyway.
336
elif length == -1:
+ del self[:] # clear the internal list - deserialization will overwrite anyway.
337
for i in xrange(len(self), (len(value)-pos)/self._type().serialized_size()):
338
self.append(0)
339
return super(List, self).deserialize(value, pos)
340
else:
341
342
for i in xrange(len(self), length):
343
344
0 commit comments