Not clear on what documentation means here [pxlpluker]

Daniel Dittmar daniel.dittmar at sap.com
Wed Mar 10 11:57:21 EST 2004


pxlpluker wrote:
> So what does the + mean on w+ & a+ mean?
This means that you can write to the file, seek to a different position and
then read from the file without reopening.

> Also please could someone explain w+ truncating the file.
This means that the file gets truncated.
If you open the file with w+ and write 10 bytes, the resulting file will
contain 10 bytes. If you open it with r+ and write 10 bytes, the resulting
file will contain the bytes you have just written and then bytes [10:] of
the original file.

Daniel






More information about the Python-list mailing list