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

Method openhook

Lib/test/test_fileinput.py:62–64  ·  view source on GitHub ↗
(self, filename, mode)

Source from the content-addressed store, hash-verified

60 self._linesread = []
61
62 def openhook(self, filename, mode):
63 self.it = iter(filename.splitlines(True))
64 return self
65
66 def readline(self, size=None):
67 line = next(self.it, '')

Callers

nothing calls this directly

Calls 1

splitlinesMethod · 0.45

Tested by

no test coverage detected