This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pakal
Recipients pakal, pitrou
Date 2010-01-05.19:27:09
SpamBayes Score 3.42646e-08
Marked as misclassified No
Message-id <>

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 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 ?

Date User Action Args
2010-01-05 19:27:11pakalsetrecipients: + pakal, pitrou
2010-01-05 19:27:11pakalsetmessageid: <>
2010-01-05 19:27:10pakallinkissue6939 messages
2010-01-05 19:27:09pakalcreate