Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2dab9c7 commit e2ec3ebCopy full SHA for e2ec3eb
1 file changed
Objects/fileobject.c
@@ -1161,7 +1161,7 @@ file_write(PyFileObject *f, PyObject *args)
1161
int n, n2;
1162
if (f->f_fp == NULL)
1163
return err_closed();
1164
- if (!PyArg_Parse(args, f->f_binary ? "s#" : "t#", &s, &n))
+ if (!PyArg_ParseTuple(args, f->f_binary ? "s#" : "t#", &s, &n))
1165
return NULL;
1166
f->f_softspace = 0;
1167
Py_BEGIN_ALLOW_THREADS
@@ -1378,7 +1378,7 @@ static char isatty_doc[] =
1378
static PyMethodDef file_methods[] = {
1379
{"readline", (PyCFunction)file_readline, METH_VARARGS, readline_doc},
1380
{"read", (PyCFunction)file_read, METH_VARARGS, read_doc},
1381
- {"write", (PyCFunction)file_write, METH_OLDARGS, write_doc},
+ {"write", (PyCFunction)file_write, METH_VARARGS, write_doc},
1382
{"fileno", (PyCFunction)file_fileno, METH_NOARGS, fileno_doc},
1383
{"seek", (PyCFunction)file_seek, METH_VARARGS, seek_doc},
1384
#ifdef HAVE_FTRUNCATE
0 commit comments