typing
typing copied to clipboard
Python static typing home. Hosts the documentation and a user help forum.
(This is an extension to #241 and copied from the discussion there.) What about having a magic class decorator (with no or minimal runtime effect) or a base class that...
Some thoughts copied from srittau/type-stub-pep#94: * Convert to restructed text to fit with the rest of the typing docs (and Python docs in general). * Update a few recommended practices...
Thoughts on the tutorial document. ## Basic Topics * Set up a basic venv with a pinned mypy version. (For compatibility reasons.) Should add a note about using a current...
``isinstance(obj, ProtocolSubclass)`` only checks the the existence of ``ProtocolSubclass``'s methods on ``obj`` and not the type signature. To provide deeper checks, maybe ``isinstance`` could check attributes/methods on ``ProtocolSubclass`` that are...
I have a number of cases where it would be very useful to use `P.args` and `P.kwargs` of a `ParamSpec` to annotate tuple and dict objects, for example, when extracting...
I believe I'm not the only one who will struggle with behavior of `Callable` type aliases. I hope if this is added to the documentation - some people will save...
I was wondering if it was possible to redefine what a particular generic means for a particular type (and maybe its subclasses, superclasses depending on covariance/contravariance?). My use case comes...
On https://typing.readthedocs.io/en/latest/index.html there are various sections to help users find tools such as type checkers, linters and formatters, and development environments with type support. I had previously asked in python/typeshed#8482...
We should improve links within [the spec](https://typing.readthedocs.io/en/latest/spec/type-system.html). Concretely: - Replace links to PEPs with links to the relevant part of the spec (https://github.com/python/typing/pull/1517#pullrequestreview-1763857938) - Where we mention a feature, link...
See https://discuss.python.org/t/compatibility-between-typeguard-and-bool/46364