diff options
author | Marcin Niemira <marcin.niemira@gmail.com> | 2019-04-22 11:13:51 (GMT) |
---|---|---|
committer | Inada Naoki <songofacandy@gmail.com> | 2019-04-22 11:13:51 (GMT) |
commit | ab86521a9d9999731e39bd9056420bb7774fd144 (patch) | |
tree | 048444ecc00f5ec674a802b797d94ec52d669a68 /Modules | |
parent | 662ebd2ab2047aeae9689ad254b39915c38069fd (diff) | |
download | cpython-ab86521a9d9999731e39bd9056420bb7774fd144.zip cpython-ab86521a9d9999731e39bd9056420bb7774fd144.tar.gz cpython-ab86521a9d9999731e39bd9056420bb7774fd144.tar.bz2 |
bpo-36523: Add docstring to io.IOBase.writelines (GH-12683)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_io/clinic/iobase.c.h | 8 | ||||
-rw-r--r-- | Modules/_io/iobase.c | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/Modules/_io/clinic/iobase.c.h b/Modules/_io/clinic/iobase.c.h index a5c8eea..ddaff7b 100644 --- a/Modules/_io/clinic/iobase.c.h +++ b/Modules/_io/clinic/iobase.c.h @@ -242,7 +242,11 @@ exit: PyDoc_STRVAR(_io__IOBase_writelines__doc__, "writelines($self, lines, /)\n" "--\n" -"\n"); +"\n" +"Write a list of lines to stream.\n" +"\n" +"Line separators are not added, so it is usual for each of the\n" +"lines provided to have a line separator at the end."); #define _IO__IOBASE_WRITELINES_METHODDEF \ {"writelines", (PyCFunction)_io__IOBase_writelines, METH_O, _io__IOBase_writelines__doc__}, @@ -311,4 +315,4 @@ _io__RawIOBase_readall(PyObject *self, PyObject *Py_UNUSED(ignored)) { return _io__RawIOBase_readall_impl(self); } -/*[clinic end generated code: output=60e43a7cbd9f314e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=61b6ea7153ef9940 input=a9049054013a1b77]*/ diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c index 3a8f16a..6a0d9be 100644 --- a/Modules/_io/iobase.c +++ b/Modules/_io/iobase.c @@ -751,11 +751,16 @@ _io__IOBase_readlines_impl(PyObject *self, Py_ssize_t hint) _io._IOBase.writelines lines: object / + +Write a list of lines to stream. + +Line separators are not added, so it is usual for each of the +lines provided to have a line separator at the end. [clinic start generated code]*/ static PyObject * _io__IOBase_writelines(PyObject *self, PyObject *lines) -/*[clinic end generated code: output=976eb0a9b60a6628 input=432e729a8450b3cb]*/ +/*[clinic end generated code: output=976eb0a9b60a6628 input=cac3fc8864183359]*/ { PyObject *iter, *res; |