def print_dictionary(self, d, h, n, nl=False):
        """Print complex using the specified indent (n) and newline (nl)."""
        if d in h:
            return "{}..."
        h.append(d)
        s = []
        if nl:
            s.append("\n")
            s.append(self.indent(n))
        s.append("{")
        for item in d.items():
            s.append("\n")
            s.append(self.indent(n+1))
            if isinstance(item[1], (list,tuple)):
                s.append(tostr(item[0]))
                s.append("[]")
            else:
                s.append(tostr(item[0]))
            s.append(" = ")
            s.append(self.process(item[1], h, n, True))
        s.append("\n")
        s.append(self.indent(n))
        s.append("}")
        h.pop()
        return "".join(s)