Handle also longs in EncodedSize
This commit is contained in:
@@ -105,7 +105,7 @@ class EncodedSize:
|
|||||||
self.symbols = symbols
|
self.symbols = symbols
|
||||||
|
|
||||||
def __add__(self, other):
|
def __add__(self, other):
|
||||||
if isinstance(other, int):
|
if isinstance(other, (int, long)):
|
||||||
return EncodedSize(self.value + other, self.symbols)
|
return EncodedSize(self.value + other, self.symbols)
|
||||||
elif isinstance(other, (str, Names)):
|
elif isinstance(other, (str, Names)):
|
||||||
return EncodedSize(self.value, self.symbols + [str(other)])
|
return EncodedSize(self.value, self.symbols + [str(other)])
|
||||||
|
|||||||
Reference in New Issue
Block a user