def _dict_pprinter_factory(start, end, basetype=None):
    def inner(obj, p, cycle):
        typ = type(obj)
        if basetype is not None and typ is not basetype and typ.__repr__ != basetype.__repr__:
            # If the subclass provides its own repr, use it instead.
            return p.text(typ.__repr__(obj))

        if cycle:
            return p.text('{...}')
        p.begin_group(1, start)
        keys = list(obj.keys())
        try:
            keys.sort()
        except Exception as e:
            # Sometimes the keys don't sort.
            pass
        for idx, key in enumerate(keys):
            if idx:
                p.text(',')
                p.breakable()
            p.pretty(key)
            p.text(': ')
            p.pretty(obj[key])
        p.end_group(1, end)
    return inner
Creates a new Markdown instance.
dataset/ETHPy150Open ipython/ipython-py3k/IPython/lib/pretty.py/_dict_pprinter_factory--crossover with--dataset/ETHPy150Open isnowfy/pydown/markdown/__init__.py/Markdown.__init__