Inada Naoki <songofaca...@gmail.com> added the comment:

I am not happy about exposing every internal types. I prefer duck typing.

Like OrderedDict, not all dict subtypes uses `dict_keys`, `dict_views`, and 
`dict_items`.
If typeshed annotate dict.keys() returns `dict_keys`, "incompatible override" 
cano not be avoided.

I prefer:

* Keep status-quo: keys().mapping cause false positive and user need to 
suppress. This is not a big problem because `.mapping` is very rarely used.
* Or add `.mapping` to `KeysView`, `ValuesView`, and `ItemsView`. Force every 
dict subclasses to implement it.

----------
nosy: +methane

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

Reply via email to