MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __init__

Method __init__

tools/python-3.11.9-amd64/Lib/aifc.py:579–593  ·  view source on GitHub ↗
(self, f)

Source from the content-addressed store, hash-verified

577 _file = None # Set here since __del__ checks it
578
579 def __init__(self, f):
580 if isinstance(f, str):
581 file_object = builtins.open(f, 'wb')
582 try:
583 self.initfp(file_object)
584 except:
585 file_object.close()
586 raise
587
588 # treat .aiff file extensions as non-compressed audio
589 if f.endswith('.aiff'):
590 self._aifc = 0
591 else:
592 # assume it is an open file object already
593 self.initfp(f)
594
595 def initfp(self, file):
596 self._file = file

Callers

nothing calls this directly

Calls 4

initfpMethod · 0.95
endswithMethod · 0.80
openMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected