[New-bugs-announce] [issue30689] len() and iter() of ChainMap don't work with unhashable keys

Serhiy Storchaka report at bugs.python.org
Sat Jun 17 08:31:43 EDT 2017


New submission from Serhiy Storchaka:

As documented ChainMap supports not just dicts, but mappings. A mapping can be implemented not only as a hash table, and mapping keys can be not hashable. But ChainMap.__len__ and ChainMap.__iter__ work only with hashable keys.

This may be considered just as a documentation issue. But I think it would be nice to add the support of unhashable keys in 3.7.

----------
assignee: rhettinger
components: Library (Lib)
messages: 296236
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: len() and iter() of ChainMap don't work with unhashable keys
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7

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


More information about the New-bugs-announce mailing list