[Python-3000] iostack and sock2
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Jun 6 02:57:07 CEST 2006
tomer filiba wrote:
> yes, but +=/-= can be overriden to provide "efficient seeking". and, just
> thought about it: just like negative indexes of sequences, negative positions
> should be relative to the end of the stream. for example:
>
> f.position = 4 # absolute -- seek(4, "start")
> f.position += 6 # relative to current -- seek(6, "curr")
> f.position = -7 # relative to end of stream -- seek(-7, "end")
How would you seek to exactly the end of the file,
without introducing signed integer zeroes to Python?-)
--
Greg
More information about the Python-3000
mailing list