bpo-36523: Add docstring to io.IOBase.writelines (GH-12683)

This commit is contained in:
Marcin Niemira 2019-04-22 21:13:51 +10:00 committed by Inada Naoki
parent 662ebd2ab2
commit ab86521a9d
4 changed files with 18 additions and 3 deletions

View file

@ -551,6 +551,11 @@ class IOBase(metaclass=abc.ABCMeta):
return lines
def writelines(self, lines):
"""Write a list of lines to the stream.
Line separators are not added, so it is usual for each of the lines
provided to have a line separator at the end.
"""
self._checkClosed()
for line in lines:
self.write(line)