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

Method readlines

Lib/test/test_fileinput.py:71–81  ·  view source on GitHub ↗
(self, hint=-1)

Source from the content-addressed store, hash-verified

69 return line
70
71 def readlines(self, hint=-1):
72 lines = []
73 size = 0
74 while True:
75 line = self.readline()
76 if not line:
77 return lines
78 lines.append(line)
79 size += len(line)
80 if size >= hint:
81 return lines
82
83 def close(self):
84 pass

Callers 15

test_readlinesMethod · 0.45
test_history_sizeMethod · 0.45
testReadLinesMethod · 0.45
test_newlineMethod · 0.45
test_iteratorMethod · 0.45
test_writelinesMethod · 0.45
test_newlineMethod · 0.45
test_readlinesMethod · 0.45

Calls 2

readlineMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected