[issue6939] shadows around the io truncate() semantics

Antoine Pitrou report at bugs.python.org
Tue Jan 5 20:36:03 CET 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

> Are there new elements, advocating a status quo on this matter ?

Nothing, it's just lacking a patch from someone interested in the
matter.

> On a separate note, I'm confused about the "at most" phrase in the
> current documentation :
> ---
> truncate(size=None)
>     Truncate the file to at most size bytes. size defaults to the
> current file position, as returned by tell()
> ---
> According to what I've read so far, a succesful truncate() call will
> always extend/reduce the file until teh desired size, isn't that so on
> all platforms ?

I suppose it was worded that way because some platforms may not support
extending a file when a parameter larger than the current size is given.
I don't know if such systems are widespread.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6939>
_______________________________________


More information about the Python-bugs-list mailing list