<p><br>
On Sep 25, 2012 9:28 AM, "Dennis Lee Bieber" <<a href="mailto:wlfraed@ix.netcom.com">wlfraed@ix.netcom.com</a>> wrote:<br>
><br>
> On Tue, 25 Sep 2012 08:22:05 +0200, Ulrich Eckhardt<br>
> <<a href="mailto:ulrich.eckhardt@dominolaser.com">ulrich.eckhardt@dominolaser.com</a>> declaimed the following in<br>
> gmane.comp.python.general:<br>
><br>
> > Am 24.09.2012 23:49, schrieb Dave Angel:<br>
> > > And what approach would you use for positioning relative to<br>
> > > end-of-file?  That's currently done with an optional second<br>
> >  > parameter to seek() method.<br>
> ><br>
> > Negative indices.<br>
> ><br>
><br>
>         Which still doesn't handle the third seek mode -- relative to<br>
> current position.</p>
<p>f.pos += delta</p>
<p>That's the only part of the proposal that I really think is an improvement over the current method:</p>
<p>f.seek(delta, 1)</p>
<p>I actually had to google the whence code for relative seeking which I wouldn't need to do if it were more descriptive. </p>
<p>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.</p>
<p>Oscar</p>