This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ngie
Recipients ngie, steven.daprano
Date 2019-02-25.22:42:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551134530.09.0.20093475112.issue36111@roundup.psfhosted.org>
In-reply-to
Content
?!

Being blunt: why should opening a file in binary vs text mode matter? POSIX doesn't make this distinction.

Per the pydoc (https://docs.python.org/2/library/functions.html#open):

> The default is to use text mode, which may convert '\n' characters to a platform-specific representation on writing and back on reading.

If this is one of the only differentiators between binary and text mode, why should certain types of seeking be made impossible?

Having to stat the file, then set the cursor to the size of the file, minus the offset breaks the 'seek(..)' interface, and having to use 'rb', then convert from bytes to unicode overly complicates things :(.
History
Date User Action Args
2019-02-25 22:42:10ngiesetrecipients: + ngie, steven.daprano
2019-02-25 22:42:10ngiesetmessageid: <1551134530.09.0.20093475112.issue36111@roundup.psfhosted.org>
2019-02-25 22:42:10ngielinkissue36111 messages
2019-02-25 22:42:09ngiecreate