Message336565
I believe you will find that this is because you opened the file in text mode, which means Unicode, not bytes. If you open it in binary mode, the POSIX spec applies:
py> fp = open("sample", "rb"); fp.seek(-100, os.SEEK_END)
350
Supported values for seeking in text (Unicode) files are documented here:
https://docs.python.org/3/library/io.html#io.TextIOBase.seek
I don't believe this is a bug, or possible to be changed. Do you still think otherwise? If not, we should close this ticket. |
|
Date |
User |
Action |
Args |
2019-02-25 22:33:23 | steven.daprano | set | recipients:
+ steven.daprano, ngie |
2019-02-25 22:33:23 | steven.daprano | set | messageid: <1551134003.15.0.800749101559.issue36111@roundup.psfhosted.org> |
2019-02-25 22:33:23 | steven.daprano | link | issue36111 messages |
2019-02-25 22:33:23 | steven.daprano | create | |
|