[docs] [issue24659] dict() built-in fails on iterators with a "keys" attribute

Christian Barcenas report at bugs.python.org
Sat Jul 18 11:07:29 CEST 2015


Christian Barcenas added the comment:

Should have clarified that the specific issue that is outlined in #5945 is that PyMapping_Check returns 1 on sequences (e.g. lists), which would mean something like x = [('one', 1), ('two', 2)]; dict(x) would fail in 3.x because x would be incorrectly evaluated as a mapping rather than as an iterable.

----------

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


More information about the docs mailing list