[issue18986] Add a case-insensitive case-preserving dict
Richard Oudkerk
report at bugs.python.org
Tue Sep 10 16:53:59 CEST 2013
Richard Oudkerk added the comment:
With the current patch __repr__() will fail if the untransformed key is unhashable:
>>> d = collections.transformdict(id)
>>> L = [1,2,3]
>>> d[L] = None
>>> d.keys()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Repos\cpython-dirty\lib\collections\abc.py", line 444, in __repr__
return '{0.__class__.__name__}({0._mapping!r})'.format(self)
File "C:\Repos\cpython-dirty\lib\collections\__init__.py", line 944, in __repr__
self._transform, repr(dict(self)))
TypeError: unhashable type: 'list'
----------
nosy: +sbt
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18986>
_______________________________________
More information about the Python-bugs-list
mailing list