Josh Rosenberg added the comment: For the record, the StringIO module is Python 2 only (replaced by io.StringIO and io.BytesIO for Py3, which are also available on 2.6 and higher if you need consistency), and only documents truncate by reference to the generic docs for the built-in file object. Admittedly, the built-in file object docs say the position shouldn't change on truncate, but given:
1. StringIO is deprecated and no longer maintained 2. Code using it may rely on this incorrect behavior I can't see fixing this beyond possibly mentioning the quirk in the 2.x StringIO docs. Since io.StringIO is correct, there is nothing to fix in 3.x. ---------- nosy: +josh.r _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30250> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com