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

Currently, the ["Version and platform checking" section](https://typing.readthedocs.io/en/latest/spec/directives.html#version-and-platform-checking) of the typing spec is very barebones. It basically says: > Type checkers are expected to understand simple version and platform checks. [...]...

topic: typing spec

This is an initial proposed draft of an expanded "type system concepts" document for the typing specification. It intends to improve clarity of the spec by giving definition to important...

The typing spec currently says this: > Python’s numeric types complex, float and int are not subtypes of each other, but to support common use cases, the type system contains...

topic: typing spec

Picking up from https://discuss.python.org/t/would-adding-converter-to-dataclass-transform-even-need-a-pep/55125 Which stems from https://discuss.python.org/t/pep-712-adding-a-converter-parameter-to-dataclasses-field/26126 (already discussed) this PR adds `converter` as another field specifier parameter.

Typing Council decision
topic: typing spec

This term is used in a few places in the spec, but never defined. I think it is intended to mean "a type specified by the name of a Python...

topic: typing spec

See https://github.com/python/typing/pull/1743#discussion_r1641580302

topic: typing spec

See https://github.com/python/typing/pull/1743#discussion_r1640641003

topic: typing spec

See https://github.com/python/typing/pull/1743#discussion_r1640637378

topic: typing spec

My suggestion is to add a way to coerce type narrowing without any runtime change, by adding new `type_assert` and/or `ensure_type`. ```python def function(arg: Any): type_assert isinstance(arg, int) reveal_type(arg) #...

topic: feature