Martin Panter added the comment:

It is at least an omission from the documentation. The glossary 
<https://docs.python.org/dev/glossary.html#term-mapping> refers to the Mapping 
ABC. From Christian’s point of view, the quack of an iterator with just a 
“keys” attribute sounds more like an iterator than a mapping.

I think the documentation for the dict() constructor should say how to ensure 
the iterable and mapping modes are triggered. Perhaps dict.update() should 
also, because it appears to also treat non-dict() “mappings” differently to 
plain iterators.

----------
nosy: +vadmium

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24659>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to