| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
The writelines() method now accepts any iterable argument and writes
the lines one at a time rather than using ''.join(lines) followed by
a single write. Results in considerable memory savings and makes
the method suitable for use with generator expressions.
|
|
|
|
| |
From SF patch #852334.
|
| |
|
|
|
|
|
| |
"read until end of line ('\n') or EOF" will be treated literally.
Fixes SF bug #860155.
|
| |
|
|
|
|
| |
(This should also be done to cStringIO.)
|
|
|
|
|
| |
being used to dump output (no seeks), so we can avoid a lot
of extra checks being made.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
x in string.whitespace => x.isspace()
type(x) in types.StringTypes => isinstance(x, basestring)
isinstance(x, types.StringTypes) => isinstance(x, basestring)
type(x) is types.StringType => isinstance(x, str)
type(x) == types.StringType => isinstance(x, str)
string.split(x, ...) => x.split(...)
string.join(x, y) => y.join(x)
string.zfill(x, ...) => x.zfill(...)
string.count(x, ...) => x.count(...)
hasattr(types, "UnicodeType") => try: unicode except NameError:
type(x) != types.TupleTuple => not isinstance(x, tuple)
isinstance(x, types.TupleType) => isinstance(x, tuple)
type(x) is types.IntType => isinstance(x, int)
Do not mention the string module in the rlcompleter docstring.
This partially applies SF patch http://www.python.org/sf/562373
(with basestring instead of string). (It excludes the changes to
unittest.py and does not change the os.stat stuff.)
|
| |
|
|
|
|
| |
Closes patch 556161.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Unicode string snippets to larger Unicode strings.
This fix should also go into Python 2.2.1.
|
|
|
|
| |
input to .write() too.
|
|
|
|
| |
iterator protocol.
|
| |
|
|
|
|
|
|
|
|
| |
added test script and expected output file as well
this closes patch 103297.
__all__ attributes will be added to other modules without first submitting
a patch, just adding the necessary line to the test script to verify
more-or-less correct implementation.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
can't be imported. This makes StringIO.py work with Jython.
Also, get rid of the string module by converting to string methods.
Shorten some lines by using augmented assignment where appropriate.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This closes SourceForge bug #115527.
|
| |
|
|
|
|
| |
docstrings into comments.
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
objects; this makes the emulation of file objects a bit better, and the
exceptions explain things a bit better.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
StringIO implements pseudo files writing into and reading from strings.
|