[issue14998] pprint._safe_key is not always safe enough

2012-06-07 Thread Shawn Brown
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

[issue14998] pprint._safe_key is not always safe enough

2012-06-03 Thread Shawn Brown
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): >>>

[issue14998] pprint._safe_key is not always safe enough

2012-06-03 Thread Shawn Brown
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)