Message256324
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. |
|
Date |
User |
Action |
Args |
2015-12-13 17:33:15 | socketpair | set | recipients:
+ socketpair, vstinner, ezio.melotti, r.david.murray |
2015-12-13 17:33:15 | socketpair | set | messageid: <1450027995.39.0.306888386621.issue25849@psf.upfronthosting.co.za> |
2015-12-13 17:33:15 | socketpair | link | issue25849 messages |
2015-12-13 17:33:14 | socketpair | create | |
|