[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers
Inada Naoki
report at bugs.python.org
Wed Jan 19 05:10:43 EST 2022
Inada Naoki <songofacandy at gmail.com> added the comment:
In other words,
a. If `.keys()` in all dict subclasses must return subclass of `dict_keys`: `dict.keys() -> dict_keys`.
b. If `.keys().mapping` must be accessible for all dict subclasses: Add `.mapping` to `KeysView`.
c. If `.keys().mapping` is optional for dict subclasses: typeshed can't add `.mapping` to anywhere, AFAIK.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46399>
_______________________________________
More information about the Python-bugs-list
mailing list