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-13.17:33:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450027995.39.0.306888386621.issue25849@psf.upfronthosting.co.za>
In-reply-to
Content
https://docs.python.org/3.5/library/io.html?highlight=stringio#id3 :

Also, TextIOWrapper.tell() and TextIOWrapper.seek() are both quite slow due to the reconstruction algorithm used.

What is reconstruction algorightm ? Experiments show, that seek() and tell() returns values of count of bytes (not letters).


#!/usr/bin/python3.5
import tempfile

with tempfile.TemporaryFile(mode='r+t') as f:
    l = f.write('привет')
    print(l, f.tell()) # "6 12"
    f.seek(3)
    f.write('прекол42')
    f.seek(0)
    print(f.read()) # raise UnicodeDecodeError

So, please reopen. Issue is still here.
History
Date User Action Args
2015-12-13 17:33:15socketpairsetrecipients: + socketpair, vstinner, ezio.melotti, r.david.murray
2015-12-13 17:33:15socketpairsetmessageid: <1450027995.39.0.306888386621.issue25849@psf.upfronthosting.co.za>
2015-12-13 17:33:15socketpairlinkissue25849 messages
2015-12-13 17:33:14socketpaircreate