[issue10017] pprint.pprint raises TypeError on dictionaries with user-defined types as keys

Amaury Forgeot d'Arc report at bugs.python.org
Fri Oct 8 23:38:25 CEST 2010


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

A simpler change would to replace:
    rv = self.obj.__lt__(other.obj)
with
    rv = type(self.obj).__lt__(self.obj, other.obj)

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10017>
_______________________________________


More information about the Python-bugs-list mailing list