Message410696
As a fix, I propose that two changes be made to `dict_keys`, `dict_values` and `dict_items`:
* They should be officially exposed in the `types` module.
* `__class_getitem__` should be added to the classes.
These two changes would mean that users would be able to do the following:
```
from types import dict_keys
from typing import TypeVar
K = TypeVar("K")
V = TypeVar("V")
class DictSubclass(dict[K, V]):
def keys(self) -> dict_keys[K, V]:
return super().keys()
``` |
|
Date |
User |
Action |
Args |
2022-01-16 13:58:59 | AlexWaygood | set | recipients:
+ AlexWaygood, gvanrossum, rhettinger, serhiy.storchaka, JelleZijlstra, Dennis Sweeney, sobolevn, kj |
2022-01-16 13:58:59 | AlexWaygood | set | messageid: <1642341539.27.0.817319105121.issue46399@roundup.psfhosted.org> |
2022-01-16 13:58:59 | AlexWaygood | link | issue46399 messages |
2022-01-16 13:58:59 | AlexWaygood | create | |
|