Irit Katriel <iritkatr...@yahoo.com> added the comment:

import pprint

class MyDict(dict):
    def __repr__(self):
        return '*'*len(dict.__repr__(self))

if __name__ == '__main__':
    d=MyDict({})
    print('pprint.pformat(d):\n%s' % pprint.pformat(d))
    print('pprint.pformat(d, width=1, indent=0):\n%s' % pprint.pformat(d, 
width=1, indent=0))



Output:

pprint.pformat(d):
**
pprint.pformat(d, width=1, indent=0):
{}

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39994>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to