Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
GitHub downtime made me write more
  • Loading branch information
JelleZijlstra committed May 4, 2023
commit 0e5160f723a28b1c8c38f872f687d5a51e05d8ef
21 changes: 13 additions & 8 deletions pep-0695.rst
Original file line number Diff line number Diff line change
Expand Up @@ -912,14 +912,19 @@ clarify that the new scopes are for the most part like function scopes.
- Names bound within ``def695`` scopes cannot be rebound with a ``nonlocal`` statement in nested scopes.

``def695`` scopes are used for the evaluation of several new syntactic constructs proposed
in this PEP. In all cases, the scoping semantics are identical::

- The type parameters of generic type aliases
- The type parameters and annotations of generic functions
- The type parameters and base class expressions of generic classes
- The value of generic type aliases
- The bounds of type variables
- The constraints of type variables
in this PEP. Some are evaluated eagerly (when a type alias, function, or class is defined); others are
evaluated lazily (only when evaluation is specifically requested). In all cases, the scoping semantics are identical:

- Eagerly evaluated values:

- The type parameters of generic type aliases
- The type parameters and annotations of generic functions
- The type parameters and base class expressions of generic classes
- Lazily evaluated values:

- The value of generic type aliases
- The bounds of type variables
- The constraints of type variables

In the below translations, names that start with two underscores are internal to the implementation
and not visible to actual Python code. We use the following intrinsic functions, which in the real
Expand Down