def __str__(self):
        t = self.get_text()
        try:
            level = int(self.level)
        except (ValueError, TypeError):
            level = 0
        indent = " "*level
        lc = {0:"=", 1:"-", 2:"_", 3:"*"}.get(level, "+")
        line = lc * len(t)
        return "%s%s\n%s%s\n" % (indent, t, indent, line)
dataset/ETHPy150Open kdart/pycopia/XML/pycopia/XML/Plaintext.py/Heading.__str__/original