diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-12-11 13:06:53 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-12-11 13:06:53 (GMT) |
commit | 6233c9b470edaf9ddd4e43ccf6a9c0db38ded4d7 (patch) | |
tree | 6866e8f828541dd658c3a77160d66d0d6b5b950c | |
parent | 0479104a91b6f5964fa94b8c2197cf9bd7e017dc (diff) | |
download | cpython-6233c9b470edaf9ddd4e43ccf6a9c0db38ded4d7.zip cpython-6233c9b470edaf9ddd4e43ccf6a9c0db38ded4d7.tar.gz cpython-6233c9b470edaf9ddd4e43ccf6a9c0db38ded4d7.tar.bz2 |
Patch #650834: Document 'U' in file mode, remove stale variables.
-rw-r--r-- | Objects/fileobject.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index b6c88db..86620ff 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -1614,7 +1614,7 @@ static PyMemberDef file_memberlist[] = { {"softspace", T_INT, OFF(f_softspace), 0, "flag indicating that a space needs to be printed; used by print"}, {"mode", T_OBJECT, OFF(f_mode), RO, - "file mode ('r', 'w', 'a', possibly with 'b' or '+' added)"}, + "file mode ('r', 'U', 'w', 'a', possibly with 'b' or '+' added)"}, {"name", T_OBJECT, OFF(f_name), RO, "file name"}, /* getattr(f, "closed") is implemented without this table */ @@ -1767,13 +1767,9 @@ file_iternext(PyFileObject *f) { PyStringObject* l; - int i; - if (f->f_fp == NULL) return err_closed(); - i = f->f_softspace; - l = readahead_get_line_skip(f, 0, READAHEAD_BUFSIZE); if (l == NULL || PyString_GET_SIZE(l) == 0) { Py_XDECREF(l); |