8000 Extend NEWS entry, give credit to Larry · python/cpython@96324a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 96324a5

Browse files
committed
Extend NEWS entry, give credit to Larry
1 parent e5a6c21 commit 96324a5

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
11
Implement :pep:`695`, adding syntactic support for generic classes, generic
2-
functions, and type aliases. Patch by Eric Traut and Jelle Zijlstra.
2+
functions, and type aliases. Patch by Eric Traut, Larry Hastings, and Jelle
3+
Zijlstra.
4+
5+
This includes the following changes:
6+
7+
- A new ``type X = ...`` syntax for type aliases, which resolves at
8+
runtime to an instance of the new class ``typing.TypeAliasType``.
9+
This is implemented as a new AST node ``ast.TypeAlias``.
10+
- New syntax (``class X[T]: ...``, ``def func[T](): ...``) for defining
11+
generic functions and classes. This is implemented as a new
12+
``typeparams`` attribute on the AST nodes for classes and functions.
13+
This node holds instances of the new AST classes ``ast.TypeVar``,
14+
``ast.ParamSpec``, and ``ast.TypeVarTuple``.
15+
- ``typing.TypeVar``, ``typing.ParamSpec``, ``typing.ParamSpecArgs``,
16+
``typing.ParamSpecKwargs``, ``typing.TypeVarTuple``, and
17+
``typing.Generic`` are now implemented in C rather than Python.
18+
- New bytecode instructions ``LOAD_LOCALS`` and ``LOAD_CLASS_OR_GLOBAL``
19+
to support correct resolution of names in class namespaces.

0 commit comments

Comments
 (0)
0