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

Method __init__

Lib/tarfile.py:309–316  ·  view source on GitHub ↗
(self, name, mode)

Source from the content-addressed store, hash-verified

307 """
308
309 def __init__(self, name, mode):
310 mode = {
311 "r": os.O_RDONLY,
312 "w": os.O_WRONLY | os.O_CREAT | os.O_TRUNC,
313 }[mode]
314 if hasattr(os, "O_BINARY"):
315 mode |= os.O_BINARY
316 self.fd = os.open(name, mode, 0o666)
317
318 def close(self):
319 os.close(self.fd)

Callers

nothing calls this directly

Calls 1

openMethod · 0.45

Tested by

no test coverage detected