MCPcopy Create free account
hub / github.com/ActiveState/code / writelines

Method writelines

recipes/Python/492214_dal6py/recipe-492214.py:258–265  ·  view source on GitHub ↗
(self, sequence, separator=None)

Source from the content-addressed store, hash-verified

256
257 # Write All Lines
258 def writelines(self, sequence, separator=None):
259 assert type(sequence) is list
260 if separator is None:
261 for line in sequence:
262 self.write(line)
263 else:
264 assert type(separator) is str
265 self.write(separator.join(sequence))
266
267 # Return File Size
268 def size(self):

Callers

nothing calls this directly

Calls 2

writeMethod · 0.95
joinMethod · 0.45

Tested by

no test coverage detected