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 pitrou, serhiy.storchaka, vstinner
Date 2017-05-02.13:56:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493733408.46.0.774043431149.issue30228@psf.upfronthosting.co.za>
In-reply-to
Content
I don't like PR 1385. abs_pos is a private attribute used only in _io._Buffered.seek() for readable streams when whence is SEEK_SET or SEEK_CUR. There is no guarantee that it contains relevant value for non-readable stream.

You could call buffer.seek(0, SEEK_CUR) rather than buffer.tell() for avoiding a system call for readable stream. But this looks as a shamanism too.

Or provide a function similar to the RAW_TELL macro but just checking if the current position is 0. If define it in bufferedio.c near _buffered_raw_tell() it is more chance that it is consistent with abs_pos and future changes don't break it.
History
Date User Action Args
2017-05-02 13:56:48serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner
2017-05-02 13:56:48serhiy.storchakasetmessageid: <1493733408.46.0.774043431149.issue30228@psf.upfronthosting.co.za>
2017-05-02 13:56:48serhiy.storchakalinkissue30228 messages
2017-05-02 13:56:48serhiy.storchakacreate