Skip to content

gh-158660: Add PyListBuilder_FromBuffer() function - #162976

Open
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:list_builder_frombuffer
Open

vstinner wants to merge 1 commit into
python:mainfrom
vstinner:list_builder_frombuffer

Conversation

@vstinner

@vstinner vstinner commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

@read-the-docs-community

read-the-docs-community Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

📖 6 files modified


Preview · build overview · cpython-previews · built Dec. 2, 2026, 11:24 p.m. UTC

@vstinner
vstinner force-pushed the list_builder_frombuffer branch from 50a0c84 to 800bbba Compare December 2, 2026 23:21
@vstinner
vstinner marked this pull request as ready for review December 3, 2026 00:16
@vstinner

vstinner commented Dec 3, 2026

Copy link
Copy Markdown
Member Author

@pitrou: Here is the API that you asked for.

@encukou: You said that you had concerns about this API?

My current implementation requires the buffer to have exactly 1 dimension. It makes the implementation simpler. A dimension of 0 (scalar) would not make sense for PyListBuilder_FromBuffer(). It would be possible to support dimension 2 or higher, but would it be useful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant