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 <rep...@bugs.python.org>
<http://bugs.python.org/issue18986>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to