[New-bugs-announce] [issue39365] Support (SEEK_END/SEEK_CUR) relative seeking in StringIO

random832 report at bugs.python.org
Thu Jan 16 23:23:15 EST 2020


New submission from random832 <random832 at fastmail.us>:

Currently this fails with a (misleading in the case of SEEK_END) "Can't do nonzero cur-relative seeks" error, but there's no conceptual reason it shouldn't be possible.

The offset should simply be taken as a character offset, without any pretense that the "file" represents bytes in some Unicode encoding. This is already done for SEEK_START and tell, and has not caused any problems.

----------
components: IO
messages: 360158
nosy: random832
priority: normal
severity: normal
status: open
title: Support (SEEK_END/SEEK_CUR) relative seeking in StringIO
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39365>
_______________________________________


More information about the New-bugs-announce mailing list