Message410928
I agree with Inada that not every internal type should be exposed, but I would make an exception for the dict views classes due to the fact that dict subclasses are much more common than subclasses of other mappings, such as OrderedDict. I don't think it's *particularly* important to expose the OrderedDict views classes in the same way.
Adding the "mapping" attribute to KeysView/ValuesView/ItemsView seems like it could be quite disruptive — there may be a lot of third-party users with classes that inherit from those, who'd need to make changes to their code. From a typing perspective, it would also mean that KeysView and ValuesView would have to be parameterised with two TypeVars (key-type and value-type), whereas now they both only take one (KeysView is parameterised with the key-type, ValuesView with the value-type). |
|
Date |
User |
Action |
Args |
2022-01-19 08:59:44 | AlexWaygood | set | recipients:
+ AlexWaygood, gvanrossum, rhettinger, methane, serhiy.storchaka, JelleZijlstra, Dennis Sweeney, sobolevn, kj, kumaraditya |
2022-01-19 08:59:44 | AlexWaygood | set | messageid: <1642582784.05.0.739865395887.issue46399@roundup.psfhosted.org> |
2022-01-19 08:59:44 | AlexWaygood | link | issue46399 messages |
2022-01-19 08:59:43 | AlexWaygood | create | |
|