| commit | 08f929ba70397b5c898a55bbb73c8b4e2e8e4fbb | [log] [tgz] |
|---|---|---|
| author | Alex Waygood <[email protected]> | Thu Jan 29 21:46:21 2026 +0000 |
| committer | GitHub <[email protected]> | Thu Jan 29 21:46:21 2026 +0000 |
| tree | e6af635d6f520fa252211727e1903e8654321179 | |
| parent | 444e43e38d24c68fd2b0c66e6191ab0fdf389976 [diff] |
[conformance suite] Fix inaccurate comment in `protocols_generic.py` (#2166)
[conformance suite] Fix inaccurate comnent in `protocols_generic.py`
This comment states that this class fails at runtime, but that isn't true:
```pycon
>>> from typing import *
>>> T_co = TypeVar("T_co")
>>> class Proto2(Protocol[T_co], Generic[T_co]): ...
...
>>>
```
The comment should instead quote the spec [here](https://typing.python.org/en/latest/spec/protocol.html#generic-protocols), which states that type checkers should consider it an error (even though it does not fail at runtime)The documentation for Python's static typing can be found at typing.python.org. You can get help in our support forum.
Improvements to the type system should be discussed on Python's Discourse, and are tracked in the issues in this repository.
For conversations that are more suitable to a chat platform, you can use one of the following:
This GitHub repository is used for several things:
The documentation at typing.python.org is maintained in the docs directory. This includes the specification for the type system. See especially the update procedure for the spec.
A discussion forum for typing-related user help is hosted here.
Conformance test for Python static type checkers. The latest conformance test results are here.
Historically, this repository also hosted:
The typing_extensions package, which now lives in the typing_extensions repo. It used to be in the typing_extensions directory.
A backport of the typing module for older Python versions. It was removed after all Python versions that lack typing in the standard library reached end of life. The last released version, supporting Python 2.7 and 3.4, is available at PyPI.