Message246899
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. |
|
Date |
User |
Action |
Args |
2015-07-18 13:06:24 | martin.panter | set | recipients:
+ martin.panter, r.david.murray, docs@python, christian.barcenas |
2015-07-18 13:06:24 | martin.panter | set | messageid: <1437224784.19.0.528207332189.issue24659@psf.upfronthosting.co.za> |
2015-07-18 13:06:24 | martin.panter | link | issue24659 messages |
2015-07-18 13:06:23 | martin.panter | create | |
|