-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-IOtype-refactorCode refactoring (with no changes in behavior)Code refactoring (with no changes in behavior)
Description
Feature or enhancement
Proposal:
There's new PyBytesWriter() API:
There's an ongoing effort of introducing it in various places:
With its PyList_Append
Line 1003 in 2ca3c85
| r = PyList_Append(chunks, data); |
and PyBytes_Join:
the io.RawIOBase.readall looks like the ideal candidate for PyBytesWriter.
Notably, io.RawIOBase is used internally across many modules:
https://github.com/search?q=repo%3Apython%2Fcpython+io.RawIOBase+path%3A%2F%5ELib%5C%2F%2F&type=code
and some even call readall explicitly sometimes:
Line 545 in 2ca3c85
| return self.readall() |
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-IOtype-refactorCode refactoring (with no changes in behavior)Code refactoring (with no changes in behavior)