You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/11/24 12:47:20 UTC

[GitHub] [arrow] pitrou commented on pull request #8755: ARROW-10709: [Python] Allow PythonFile.read() to always return a buffer

pitrou commented on pull request #8755:
URL: https://github.com/apache/arrow/pull/8755#issuecomment-732952249


   Well, the contract for `.read()` is normally to return a bytes object. I guess we could still be liberal here and make an exception.
   
   Another possibility would be to call `.readinto()`. It would work with all file objects providing an optimized `.readinto()`, not only your own file object with a non-bytes-returning `.read()`.
   
   Also, I don't understand what this has to do with `read_buffer`...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org