List generic arguments for collections.abc
base classes in documentation
#123583
Labels
collections.abc
base classes in documentation
#123583
Documentation
When #123544 lands, we'll have PEP585-related documentation spread even further than before. Deprecated aliases in
typing
correctly list the generic arguments, but are otherwise undocumented - all such entries boil down to "deprecated in favour ofcollections.abc.X
".Several relevant changes were discussed along #123523.
There's no direct way for a user to find generic parameters of
collections.abc.Generator
- they are listed fortyping.Generator
and in "annotating generators and coroutines" section intyping
docs (the latter linked fromcollections.abc.Generator
, though).I'm certain that generic arguments represent an essential part of class' "signature" - basic amount of information we need to see to use it somehow.
However,
collections.abc
is not really a type-hinting module, hence providing those signatures there directly can add too much cognitive load.As of now, my best suggestion is to introduce "Type parameters" section for each generic alias there, like this:
cc @AA-Turner and @AlexWaygood - we started this discussion in the PR above.
The text was updated successfully, but these errors were encountered: