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 serhiy.storchaka
Recipients Zero, benjamin.peterson, docs@python, fornax, pitrou, serhiy.storchaka, steve.dower, stutzbach, vstinner
Date 2016-01-19.17:24:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453224283.82.0.40657108775.issue26158@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-01-19 17:24:43serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner, benjamin.peterson, stutzbach, Zero, docs@python, steve.dower, fornax
2016-01-19 17:24:43serhiy.storchakasetmessageid: <1453224283.82.0.40657108775.issue26158@psf.upfronthosting.co.za>
2016-01-19 17:24:43serhiy.storchakalinkissue26158 messages
2016-01-19 17:24:43serhiy.storchakacreate