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 socketpair
Recipients ezio.melotti, socketpair, vstinner
Date 2015-12-12.20:19:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1449951589.63.0.511826880998.issue25849@psf.upfronthosting.co.za>
In-reply-to
Content
It seems, that we should deprecate .seek() on files, opened in text mode.

Since it is not possible to seek to position between symbols. Yes, it is possible to decode UTF-8 (or other charset) starting from beginning of the file and count symbols, but it is EXTREMELY SLOW, and is not what user expect. If so, seeking from end of file back to begin may be implemented in even more hard and error-prone way.

Moreover, I consider that we should disallow seek in text files except seek() to begin of the file (position 0) or end of file (seek(0, SEEK_END)).

Seel also issue25190 #25190 about something related for that.
History
Date User Action Args
2015-12-12 20:19:49socketpairsetrecipients: + socketpair, vstinner, ezio.melotti
2015-12-12 20:19:49socketpairsetmessageid: <1449951589.63.0.511826880998.issue25849@psf.upfronthosting.co.za>
2015-12-12 20:19:49socketpairlinkissue25849 messages
2015-12-12 20:19:49socketpaircreate