3.12
Python Language Reference
The Python Language Reference is the official, authoritative specification of the Python programming language.
Python 3.12 was released in October 2023. It introduced the following new language features:
- new syntax for type parameters for functions (e.g.,
def func[T](x: T) -> T:
) and classes (e.g.,class C[T]:
) - the
type
statement, to define a type alias (e.g.,type T = int | str
)
See What’s New In Python 3.12 for more details.
We have not (yet) cross-referenced this language specification with our misconceptions. To find misconception by language specification section, pick one of the cross-referenced specifications.