On Sep 25, 2012 9:28 AM, "Dennis Lee Bieber" <wlfr...@ix.netcom.com> wrote: > > On Tue, 25 Sep 2012 08:22:05 +0200, Ulrich Eckhardt > <ulrich.eckha...@dominolaser.com> declaimed the following in > gmane.comp.python.general: > > > Am 24.09.2012 23:49, schrieb Dave Angel: > > > And what approach would you use for positioning relative to > > > end-of-file? That's currently done with an optional second > > > parameter to seek() method. > > > > Negative indices. > > > > Which still doesn't handle the third seek mode -- relative to > current position.
f.pos += delta That's the only part of the proposal that I really think is an improvement over the current method: f.seek(delta, 1) I actually had to google the whence code for relative seeking which I wouldn't need to do if it were more descriptive. But then I never do relative seeking. I'm pretty sure my programs have always either read the whole file in order with no seeking or used random access with absolute seeking. Oscar
-- http://mail.python.org/mailman/listinfo/python-list