

def __pretty__(self, p, cycle):
    if cycle:
        return '{0}(...)'.format(self.__class__.__name__)
    else:
        with p.group(4, (self.__class__.__name__ + '('), ')'):
            try:
                ch = iter(self.children)
            except AttributeError:
                p.text(repr(self))
                return
            for (idx, ch) in enumerate(ch):
                if idx:
                    p.text(',')
                    p.breakable()
                p.pretty(ch)

dataset/ETHPy150Open tailhook/pyzza/pyzza/parser.py Node.__pretty__/original