[Python-3000] StringIO/BytesIO in io.py doesn't over-seek properly (original) (raw)
Paul Moore p.f.moore at gmail.com
Tue Jul 3 17:13:51 CEST 2007
- Previous message: [Python-3000] StringIO/BytesIO in io.py doesn't over-seek properly
- Next message: [Python-3000] StringIO/BytesIO in io.py doesn't over-seek properly
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 03/07/07, Alexandre Vassalotti <alexandre at peadrop.com> wrote:
I also find the semantic make more sense too. For example:
>>> s = StringIO("Good bye, world") >>> s.truncate(10) >>> s.write("cruel world") >>> s.getvalue() ??? I think that should return "Good bye, cruel world", not "cruel world". So, does anyone else agree with this small semantic change of truncate()?
Looks reasonable to me - without checking documentation, your proposal is what I'd expect the example to do.
Paul.
- Previous message: [Python-3000] StringIO/BytesIO in io.py doesn't over-seek properly
- Next message: [Python-3000] StringIO/BytesIO in io.py doesn't over-seek properly
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]