file.tell problems (1.5.2/Win32)

Greg Ewing greg.ewing at
Tue Jun 29 16:46:15 EDT 1999

Joshua Rosen wrote:
> This leads me to believe that `append mode' is intended to `append' at the
> *current* point in the file, which should, for consistency's sake, start at 0.

I just tried an experiment (on Windows) using "a+"
mode. It seems that f.tell() is telling the truth,
but the truth is strange.

What "a"/"a+" modes seem to mean is "open the
file positioned at 0, but if the first operation
is a write, go to the end of file before doing
it". Which seems quite bizarre to me - wouldn't
it be simpler to just go to the end of the
file on opening?


More information about the Python-list mailing list