I should have probably written my message more clearly. I'm referring to the specific expected parameters for generic types, especially those in collections.abc (e.g. Callable, Coroutine, ...). Each expects different parameters depending on its type.
Other examples, where are the (non-deprecated) generic type signatures for dict, list, etc. defined?
Data model seems appropriate for covering how to expose generic types, but the type-specific signatures should be defined closer to there types?
On Thu, 2021-05-06 at 11:10 -0300, Luciano Ramalho wrote:
The docs for __class_getitem__ are here:
I think the Data Model chapter is the right place for it.
I'm looking through the documentation, and not finding any good reference for type hints for __class_getitem__ in the collections.abc module.
I do see some of it covered in the typing module documentation, but those are deprecated, and some are somewhat cryptic (e.g. Coroutine).
Make sense to open a BPO and start a PR for doc updates?