GH-98363: Have batched() return tuples by rhettinger · Pull Request #100118 · python/cpython · GitHub

github.com

Tin mới

rhettinger:batched_tuple

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

Add itertools.batched() #98363

Have batched() return tuples instead of lists

Comment and docstring tweaks

netlify Bot commented Dec 8, 2022 • edited Loading Uh oh! There was an error while loading. Please reload this page.

netlify Bot commented Dec 8, 2022 • edited Loading Uh oh! There was an error while loading. Please reload this page.

There was an error while loading. Please reload this page.

awaiting core review

awaiting core review

Update summary table at the top of the docs

they use Py_SIZE() to determine which freelist they get put onto

The Py_SET_SIZE(result, i) is more delicate for tuples, since they use Py_SIZE() to determine which freelist they get put onto.

the tuple() constructor does

The Py_SET_SIZE(result, i) is more delicate for tuples, since they use Py_SIZE() to determine which freelist they get put onto.