New submission from Shawn Brown <03sjbr...@gmail.com>:
This is related to resolved issue 3976 and, to a lesser extent, issue 10017.
I've run across another instance where pprint throws an exception (but works
fine in 2.7 and earlier):
Python 3.2 (r32:88445, Mar 25 2011, 19:28:28)
Shawn Brown <03sjbr...@gmail.com> added the comment:
Currently, I'm monkey patching _safe_key (adding a try/except) as follows:
>>> import pprint
>>>
>>> class _safe_key(pprint._safe_key):
>>> def __lt__(self, other):
>>>
Shawn Brown <03sjbr...@gmail.com> added the comment:
Here's a patch for 3.3 -- as well as two new assertions in test_pprint.py
The added try/catch also fixes the issues mentioned in issue 10017 so I added a
test for that case as well.
--
keywords: +patch
Added