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

Function close

Tools/freeze/bkfile.py:18–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16 f = _orig_open(file, mode, bufsize)
17 _orig_close = f.close
18 def close():
19 _orig_close()
20 import filecmp
21 if filecmp.cmp(backup, file, shallow=False):
22 import os
23 os.unlink(file)
24 os.rename(backup, file)
25 f.close = close
26 return f

Callers

nothing calls this directly

Calls 2

unlinkMethod · 0.45
renameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…