[issue14386] Expose dictproxy as a public type

STINNER Victor report at bugs.python.org
Mon Mar 26 01:07:25 CEST 2012


STINNER Victor <victor.stinner at gmail.com> added the comment:

> A sequence *does* meet the (immutable) Mapping interface

Ah? Let's try:

>>> x=[1, 2, 3]
>>> x.get(2)
AttributeError: 'list' object has no attribute 'get'
>>> x.keys()
AttributeError: 'list' object has no attribute 'keys'

list doesn't implement the collections.abc.Mapping ABC.

----------

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


More information about the Python-bugs-list mailing list