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

I think this is a bug. There is recursion detection in pprint for dicts, lists 
and tuples, but it only applies when __repr__ has not been overridden in a 
subclass.

If you remove the __repr__ definition from NiceObject then str(s) works.

----------
nosy: +iritkatriel
versions: +Python 3.10, Python 3.9

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

Reply via email to