Message256291
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. |
|
Date |
User |
Action |
Args |
2015-12-12 20:19:49 | socketpair | set | recipients:
+ socketpair, vstinner, ezio.melotti |
2015-12-12 20:19:49 | socketpair | set | messageid: <1449951589.63.0.511826880998.issue25849@psf.upfronthosting.co.za> |
2015-12-12 20:19:49 | socketpair | link | issue25849 messages |
2015-12-12 20:19:49 | socketpair | create | |
|