mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
bpo-36523: Add docstring to io.IOBase.writelines (GH-12683)
This commit is contained in:
parent
662ebd2ab2
commit
ab86521a9d
4 changed files with 18 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue