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

Function fopen

Doc/includes/ndiff.py:48–52  ·  view source on GitHub ↗
(fname)

Source from the content-addressed store, hash-verified

46# open a file & return the file object; gripe and return 0 if it
47# couldn't be opened
48def fopen(fname):
49 try:
50 return open(fname)
51 except IOError as detail:
52 return fail("couldn't open " + fname + ": " + str(detail))
53
54# open two files & spray the diff to stdout; return false iff a problem
55def fcompare(f1name, f2name):

Callers 1

fcompareFunction · 0.85

Calls 3

strFunction · 0.85
failFunction · 0.70
openFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…