Pascal Chambon <chambon.pas...@gmail.com> added the comment: Hello
I'm currently finalizing the API of my raw io file implementation, but I still have trouble with the trunk implementation of IOBase.truncate(). If I remember well, in the mailing list topic on this subject, GvR noted that this change of behaviour compared to python 2.x was not intended, and that it would be better to get back to the expected behaviour - not touching the file pointer - and to document the method in this way. Are there new elements, advocating a status quo on this matter ? Or shouldn't we add the portable_lseek() call in fileio.c to fix that ? 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 ? Regards Pascal ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6939> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com