MCPcopy Index your code
hub / github.com/RustPython/RustPython / __init__

Method __init__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

hasattrFunction · 0.85
openMethod · 0.45

Tested by

no test coverage detected