"tomer filiba" <[EMAIL PROTECTED]> writes:

> yes, this was discussed some time ago. we concluded that the new
> position property should behave similar to negative indexes:
>
> f.position = 5  --  absolute seek, from the beginning of the stream
> f.position += 3  --  relative seek (*)
> f.position = -1  -- absolute seeking, back from the end (**)

Seeking to the very end requires a special constant, otherwise
it's off by 1.

I don't understand so strong desire to push that syntax despite
its problems with implementing += in one syscall and with specifying
the end point. If it doesn't work well, don't do it that way.

Of course magic constants are bad. My language Kogut has three
separate functions for seeking, it's simpler than interpreting
non-negative and negative numbers differently (and it can even seek
past the end if the OS supports that). I can't imagine a case where
the origin of seeking is not known statically.

-- 
   __("<         Marcin Kowalczyk
   \__/       [EMAIL PROTECTED]
    ^^     http://qrnik.knm.org.pl/~qrczak/
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to