Diff struct comparison, can be a list
This commit is contained in:
parent
e554e324af
commit
b8ffc8a77d
@ -390,6 +390,12 @@ class Struct(object):
|
|||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
if isinstance(other, Struct):
|
if isinstance(other, Struct):
|
||||||
return self.struct == other.struct
|
return self.struct == other.struct
|
||||||
|
elif isinstance(self.struct, list):
|
||||||
|
## FIXME: self.struct can be a dict, list, etc
|
||||||
|
for item in self.struct:
|
||||||
|
if item == other:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
else:
|
else:
|
||||||
return self.struct == other
|
return self.struct == other
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user