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, r.david.murray, socketpair, vstinner
Date 2015-12-14.22:12:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450131156.43.0.782276444989.issue25849@psf.upfronthosting.co.za>
In-reply-to
Content
First, it seems that there are no real "reconstruction algorithm" at all. Seek is allowed to point to any byte position, even to place "inside" characters for multibyte encodings, such as UTF-8.

Second, about performance:  I talk about implementation mentioned in first message. If it is not used (and will not be used), we may forget about that sentence.

Next, once again:

I consider it is a bug in allowing to seek to invalid byte offsets for text files. Since we cannot easily calculate what offset will be valid (for example, seek past the end of file, or places inside character), just disallow seek. In real applications, no one will seek/peek to places other than

* beginning of the file
* current byte offset
* seeking to the end of file.

so this seeks/peeks must be allowed.

This is applicable only to variable multibyte encodings (such as UTF-8).
History
Date User Action Args
2015-12-14 22:12:36socketpairsetrecipients: + socketpair, vstinner, ezio.melotti, r.david.murray
2015-12-14 22:12:36socketpairsetmessageid: <1450131156.43.0.782276444989.issue25849@psf.upfronthosting.co.za>
2015-12-14 22:12:36socketpairlinkissue25849 messages
2015-12-14 22:12:35socketpaircreate