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

Class FakeFile

Lib/test/test_configparser.py:1510–1520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1508
1509
1510class FakeFile:
1511 def __init__(self):
1512 file_path = support.findfile("cfgparser.1", subdir="configdata")
1513 with open(file_path, encoding="utf-8") as f:
1514 self.lines = f.readlines()
1515 self.lines.reverse()
1516
1517 def readline(self):
1518 if len(self.lines):
1519 return self.lines.pop()
1520 return ''
1521
1522
1523def readline_generator(f):

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…