Message258611
This is because the file is buffered.
>>> open('temp.txt', 'w').write('ABCDE\nFGHIJ\nKLMNO\nPQRST\nUVWXY\nZ\n')
32
>>> f = open('temp.txt', 'r+')
>>> f.readline()
'ABCDE\n'
>>> f.tell()
6
>>> f.buffer.tell()
32
>>> f.buffer.raw.tell()
32
The documentation needs a clarification. |
|
Date |
User |
Action |
Args |
2016-01-19 17:24:43 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, vstinner, benjamin.peterson, stutzbach, Zero, docs@python, steve.dower, fornax |
2016-01-19 17:24:43 | serhiy.storchaka | set | messageid: <1453224283.82.0.40657108775.issue26158@psf.upfronthosting.co.za> |
2016-01-19 17:24:43 | serhiy.storchaka | link | issue26158 messages |
2016-01-19 17:24:43 | serhiy.storchaka | create | |
|