Author pakal
Recipients pakal, pitrou
Date 2010-01-05.19:27:09
SpamBayes Score 3.42646e-08
Marked as misclassified No
Message-id <1262719631.62.0.41357445446.issue6939@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2010-01-05 19:27:11pakalsetrecipients: + pakal, pitrou
2010-01-05 19:27:11pakalsetmessageid: <1262719631.62.0.41357445446.issue6939@psf.upfronthosting.co.za>
2010-01-05 19:27:10pakallinkissue6939 messages
2010-01-05 19:27:09pakalcreate