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

Function read

Tools/scripts/combinerefs.py:81–86  ·  view source on GitHub ↗
(fileiter, pat, whilematch)

Source from the content-addressed store, hash-verified

79# (when whilematch is false), is lost, and fileiter will resume at the line
80# following it.
81def read(fileiter, pat, whilematch):
82 for line in fileiter:
83 if bool(pat.match(line)) == whilematch:
84 yield line
85 else:
86 break
87
88def combinefile(f):
89 fi = iter(f)

Callers 1

combinefileFunction · 0.70

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…