Commit Graph

12 Commits

Author SHA1 Message Date
Guido van Rossum b636dc67ed [ Bug #116636 ] Bug in StringIO.write()
http://sourceforge.net/bugs/?func=detailbug&bug_id=116636&group_id=5470
bobalex@rsv.ricoh.com

Bug report: If the file position is less than the end of the "file",
and a write is performed extending past then end of the file, the data
string is corrupted.

Solution: in write(), when writing past the end, properly set self.len
when newpos is > self.len.
2000-10-12 16:45:37 +00:00
Fred Drake e0a7f4f9d5 Add truncate() method to StringIO objects.
This closes SourceForge bug #115527.
2000-09-28 04:21:06 +00:00
Martin v. Löwis a05fa1d9d4 Support sizehint in StringIO.readlines, as documented. 2000-09-19 11:07:44 +00:00
Guido van Rossum 98d9fd3e68 Simple changes by Gerrit Holl - move author acknowledgements out of
docstrings into comments.
2000-02-28 15:12:25 +00:00
Guido van Rossum 4acc25bd39 Mass patch by Ka-Ping Yee:
1. Comments at the beginning of the module, before
       functions, and before classes have been turned
       into docstrings.

    2. Tabs are normalized to four spaces.

Also, removed the "remove" function from dircmp.py, which reimplements
list.remove() (it must have been very old).
2000-02-02 15:10:15 +00:00
Fred Drake ce4ba897be Raise the right exception (ValueError) for attempted I/O on closed StringIO
objects; this makes the emulation of file objects a bit better, and the
exceptions explain things a bit better.
1998-08-18 17:43:08 +00:00
Guido van Rossum 2e2525fd3c Patch by Lars Wirzenius to allow f.readline(length). 1997-07-25 14:56:01 +00:00
Guido van Rossum d3901028cf Sjoerd's StringIO speed-up 1996-06-19 14:54:19 +00:00
Guido van Rossum f7476c5088 fix default arg for read() -- should be -1 1996-01-25 17:34:14 +00:00
Sjoerd Mullender aa3e163fa1 Added flush() method. 1995-07-19 11:21:21 +00:00
Guido van Rossum 0daa13b188 set softspace to 0 in __init__ 1995-06-22 18:45:04 +00:00
Guido van Rossum 85d8945590 Two new generally useful modules: types defines names for all built-in types,
StringIO implements pseudo files writing into and reading from strings.
1994-06-23 11:53:27 +00:00