summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-05-04 04:16:52 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-05-04 04:16:52 (GMT)
commit015dd821364f8c210baa9faf9d66dc766f9b591e (patch)
treecac3e7f79348bd48f10bb8b66f174d149febe5b8 /Objects
parentd72312857e985efac3127ef9eabae7d526230d69 (diff)
downloadcpython-015dd821364f8c210baa9faf9d66dc766f9b591e.zip
cpython-015dd821364f8c210baa9faf9d66dc766f9b591e.tar.gz
cpython-015dd821364f8c210baa9faf9d66dc766f9b591e.tar.bz2
Somewhere along the way, the softspace attr of file objects became read-
only. Repaired, and added new tests to test_file.py.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/fileobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 5b2267b..92cfa5b 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -1962,7 +1962,8 @@ PyTypeObject PyFile_Type = {
0, /* tp_call */
0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */
- 0, /* tp_setattro */
+ /* softspace is writable: we must supply tp_setattro */
+ PyObject_GenericSetAttr, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
file_doc, /* tp_doc */