Tin mới
faster-cpython:specialize-for-iter-gen
GitHub CopilotWrite better code with AI
GitHub Copilot appDirect agents from issue to merge
CodespacesInstant dev environments
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
GitHub SponsorsFund open source developers
Copilot for BusinessEnterprise-grade AI features
Premium SupportEnterprise-grade 24/7 support
Specialize FOR_ITER for generators.
https://github.com/python/cpython/compare/main...faster-cpython:cpython:specialize-for-iter-gen-handle-exc-stack?expand=1 fixes the gi_exc_state issue, but is messy. I think this would benefit from merging #96319 first
Learn more about hiding disruptive comments
The reason will be displayed to describe this comment to others. Learn more.
Because it's the offset for YIELD_VALUE to return to relative to RETURN_VALUE https://github.com/python/cpython/pull/98772/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59deR2087
I suspect there aren't enough uses of generators in the benchmark suite for this to make a difference.
Merge branch 'main' into specialize-for-iter-gen
Add test for nested exc_info in loop.
Use new API for current exception
pylint is broken with CPython main #101914
Python 3.12 - ValueError: generator already executing pylint-dev/pylint#9138