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

Version Path
trackler-2.2.1.180 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.179 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.178 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.177 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.176 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.175 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.174 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.173 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.172 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.171 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.170 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.169 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.167 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.166 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.165 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.164 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.163 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.162 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.161 tracks/python/exercises/sgf-parsing/sgf_parsing.py
trackler-2.2.1.160 tracks/python/exercises/sgf-parsing/sgf_parsing.py