Sha256: 0dc627121adf3f37b43992cde2f72bf89f4b581a1b07492c21d2d324c041423d
Contents?: true
Size: 800 Bytes
Versions: 52
Compression:
Stored size: 800 Bytes
Contents
class SgfTree(object): def __init__(self, properties=None, children=None): self.properties = properties or {} self.children = children or [] def __eq__(self, other): if not isinstance(other, SgfTree): return False for k, v in self.properties.items(): if k not in other.properties: return False if other.properties[k] != v: return False for k in other.properties.keys(): if k not in self.properties: return False if len(self.children) != len(other.children): return False for a, b in zip(self.children, other.children): if a != b: return False return True def parse(input_string): pass
Version data entries
52 entries across 52 versions & 1 rubygems