Repository navigation
Update typing module documentation based on PEP 585 #84991
Description
Activity
In documentation of typing module there is no mention of new possibilities based on PEP-585. Moreover, should be old constructs like List, Dict,... marked as deprecated?
- addeddocsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error3.9 (EOL)end of lifeend of life3.10 (EOL)end of lifeend of life
on May 29, 2020 - addeddocsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on May 29, 2020 I don't think we should deprecate List etc. (PEP-585 specifically punts on the topic) but it's good to start mentioning list[t] etc. in the docs. Do you want to volunteer to write some docs?
Alternatively, we at least need a section of documentation for things like
list[int]anddict[str, float].I've created a PR 22615 which partly addresses the documentation for GenericAlias in stdtypes.
I have a side question: should __args__, and __origin__ be documented somewhere as well? I noticed it has no documentation even though it's used to check generics. At the same time, I'm not fully sure that it's a standard Python thing rather than a CPython implementation detail.
Yes, let’s document __args__ and __origin__.
The PR should be ready for review now. Thanks for your patience.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: