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 serhiy.storchaka
Recipients mboquien, neologix, pitrou, python-dev, sbt, serhiy.storchaka
Date 2015-04-14.11:54:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Instead of the loop you can use writelines():

    f.writelines([b'\0' * bs] * (size // bs))

It would be nice to add a comment that estimate why os.ftruncate() or seek+write can't be used here. At least a link to this issue with short estimation.
Date User Action Args
2015-04-14 11:54:59serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, neologix, python-dev, sbt, mboquien
2015-04-14 11:54:59serhiy.storchakasetmessageid: <>
2015-04-14 11:54:59serhiy.storchakalinkissue21116 messages
2015-04-14 11:54:59serhiy.storchakacreate