Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

PEP 695: Lazy evaluation, concrete scoping semantics, other changes #3122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
May 8, 2023
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 21 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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.