GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — gh-60107: Remove a copy from RawIOBase.read by cmaloney · Pull Request #141532 · python/cpython Conversation
|
| } | ||
| return res; | ||
| } | ||
| res = PyObject_CallMethod(b, "take_bytes", NULL); |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@vstinner : Not sure how common this "resize/discard then take_bytes" is going to be; might make sense to change to take_bytes(n=None, /, *, discard=False)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
for now planning to keep that in back pocket until need many ways (ba.resize(n) or del ba[:n] gives the same capability)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can you also update RawIOBase.read() in the _pyio module?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Have that in #141539 which does all the cases |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Victor Stinner <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
If the underlying I/O class keeps a reference to the memory, raise BufferError. Co-authored-by: Victor Stinner <[email protected]>
If the underlying I/O class keeps a reference to the memory, raise BufferError. Co-authored-by: Victor Stinner <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.