[issue14386] Expose dictproxy as a public type

Éric Araujo report at bugs.python.org
Fri Mar 30 01:15:21 CEST 2012


Éric Araujo <merwok at netwok.org> added the comment:

> MappingView is a strange ABC: it should probably declare __contains__ as an abstract method.
I think that was not done because it would not be very useful: MappingView seems to exist only as a base class for the other *View, which define __contains__.

> I don't see why it doesn't inherit from Set (which would avoid the need of declaring __contains__,
> Set is a Container) whereas KeysView, ItemsView and ValuesView do inherit from Set.
Not ValuesView, because you may have the same object as more than one value.

----------

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


More information about the Python-bugs-list mailing list