This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients AlexWaygood, Dennis Sweeney, JelleZijlstra, gvanrossum, kj, kumaraditya, methane, rhettinger, serhiy.storchaka, sobolevn
Date 2022-01-19.04:53:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642567993.17.0.270837026123.issue46399@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2022-01-19 04:53:13methanesetrecipients: + methane, gvanrossum, rhettinger, serhiy.storchaka, JelleZijlstra, Dennis Sweeney, sobolevn, kj, kumaraditya, AlexWaygood
2022-01-19 04:53:13methanesetmessageid: <1642567993.17.0.270837026123.issue46399@roundup.psfhosted.org>
2022-01-19 04:53:13methanelinkissue46399 messages
2022-01-19 04:53:13methanecreate