MCPcopy Index your code
hub / github.com/python/cpython / writelines

Method writelines

Lib/_pyio.py:579–587  ·  view source on GitHub ↗

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, lines)

Source from the content-addressed store, hash-verified

577 return lines
578
579 def writelines(self, lines):
580 """Write a list of lines to the stream.
581
582 Line separators are not added, so it is usual for each of the lines
583 provided to have a line separator at the end.
584 """
585 self._checkClosed()
586 for line in lines:
587 self.write(line)
588
589io.IOBase.register(IOBase)
590

Callers

nothing calls this directly

Calls 2

_checkClosedMethod · 0.95
writeMethod · 0.45

Tested by

no test coverage detected