gh-104374: Remove access to class scopes for inlined comprehensions by JelleZijlstra · Pull Request #104528 · python/cpython · GitHub

github.com

Tin mới

JelleZijlstra:classcomp2

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

List comprehensions now have access to the enclosing class scope #104374

: Remove access to class scopes for inlined comprehens…

View reviewed changes

Learn more about hiding disruptive comments

The reason will be displayed to describe this comment to others. Learn more.

Update Lib/test/test_listcomps.py

Remove unnecessary change

Better tests, copied from Carl's PR

Merge remote-tracking branch 'upstream/main' into classcomp2

PEP 709, for the third and (hopefully) final time python/steering-council#192

awaiting core review

awaiting core review

fix definition of 'in a class block'

a couple more tests

View reviewed changes

PEP 709: Crash with lambda + nested scope #104602

Merge remote-tracking branch 'upstream/main' into classcomp2

gh-104602: ensure all cellvars are known up front #104603

PEP 709 behavior change around mangling #104604

gh-104374: don't inline comprehensions in non-function scopes #104519

gh-109118: Allow lambdas in annotation scopes in classes #118019

gh-109118: Make comprehensions work within annotation scopes, but without inlining #118160