typing
typing copied to clipboard
Python static typing home. Hosts the documentation and a user help forum.
_Previous discussion: https://github.com/microsoft/pyright/issues/3775_ I've been playing around with TypeVarTuples recently, in particular together with Callable and args. https://peps.python.org/pep-0646/#type-variable-tuples-with-callable One issue became obvious early on which isn't defined in the PEP...
This is a continuation of this [discussion on the Intersection issue](https://github.com/python/typing/issues/213#issuecomment-344132917). I have a different use case for the `Not[...]` type, but it is related to the original discussion. My...
Considering this repository is nearly all documentation nowadays, we should probably integrate the updated license for Python documentation from the CPython repository: ``` --- LICENSE 2022-08-04 12:14:54.428637288 +0200 +++ ../cpython/LICENSE...
* Update the copyright years. * Update some wording in the history introduction. * Change capitalization of the word "internet".
At the moment it's only possible to type callables with default arguments by using a [Callback protocol ](https://peps.python.org/pep-0544/#callback-protocols). This adds a lot of additional code for just a few default...
I am developing some python-version-compatible library. I was using only `typing.Tuple` for hinting. But this way is depreciated by PEP585. So I set up a conditional branch to use the...
```py from typing import _T as T, TypeVar L = TypeVar("L", bound=list[T]) # error: Type variable "typing._T" is unbound def foo(l: L) -> L | T: # error: A function...
JSON is such a common interchange format it might make sense to define it as a specific type. ``` python3 JSON = t.Union[str, int, float, bool, None, t.Mapping[str, 'JSON'], t.List['JSON']]...
aka type constructors, generic TypeVars Has there already been discussion about those? I do a lot of FP that results in impossible situations because of this. Consider an example: ```python...
I'm not sure if I should open an issue here at typing, please let me know if there is something better. WSGI type defines. https://gist.github.com/abersheeran/f3723029387fe7f6584c6b157b90a50a When writing a more static...