typing icon indicating copy to clipboard operation
typing copied to clipboard

Python static typing home. Hosts the documentation and a user help forum.

Results 241 typing issues
Sort by recently updated
recently updated
newest added

Annotations in Python have many use cases beyond static type checking. I'd really like to be able to create a type that is an alias to another type while also...

topic: feature

Consider version 1 of my package, which defines ```python T = TypeVar('T', int, float) MyType = Union[T, List[T]] # in the user's code U = TypeVar('U', int, float) def myfunc(MyType[U],...

topic: feature

In the wild, today, if you `await` something, there are several potentially valid things to bubble back out from the innermost `await` - an `asyncio.Future` - a curio "trap" (which...

topic: feature

(First of all, apologies if this is not the proper place for suggesting this, or if this has already been discussed, I couldn't find anything related to this so I...

topic: feature

As part of the larger project for multi-dimensional arrays (https://github.com/python/typing/issues/513), one of the first questions I would like to settle is what syntax for typing data-types and shapes should look...

topic: feature

I'd like to open a discussion about typing for multi-dimensional arrays in general, and more specifically for NumPy. We have already been discussing this over in the NumPy issue tracker...

topic: feature

While I am a big proponent of static typing, I always found `typing`, the module, clunky. And `typing_extensions`? That thing I just hate, it's a usability disaster. In an ideal...

topic: feature

It would be a good idea to have a common test suite for different Python type checkers like Mypy, PyCharm, PyType. By introducing it, we could ensure that our checkers...

topic: other

There are some use cases where GenericMeta is essential (e.g. when combining Generic[T] with a custom metaclass). We should document that it exist, and what you can safely override (the...

topic: documentation

PEP 484 says that if an annotation is missing then the type assumed to be `Any` ``` python def f(x) -> None: reveal_type(x) # Revealed type is 'Any' def g(x:...

topic: feature