(self)
return rep + ')'
Ironically, encoding to SGF is much easier.
Ironically, encoding to SGF is much easier.
Ironically encoding to SGF is much easier .
def __repr__(self):
        """Ironically, encoding to SGF is much easier."""
        rep = '(;'
        for key, property_value in self.properties.items():
            rep += key
            for value in property_value:
                rep += '[{}]'.format(value)
        if self.children:
            if len(self.children) > 1:
                rep += '('
            for child in self.children:
                rep += repr(child)[1:-1]
            if len(self.children) > 1:
                rep += ')'
        return rep + ')'
def __repr__ ( self ) : rep = '(;' for key , property_value in self . properties . items ( ) : rep += key for value in property_value : rep += '[{}]' . format ( value ) if self . children : if len ( self . children ) > 1 : rep += '(' for child in self . children : rep += repr ( child ) [ 1 : - 1 ] if len ( self . children ) > 1 : rep += ')' return rep + ')'