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

Method close

tools/python-3.11.9-amd64/Lib/mailbox.py:1977–1984  ·  view source on GitHub ↗

Close the file.

(self)

Source from the content-addressed store, hash-verified

1975 self._pos = self._file.tell()
1976
1977 def close(self):
1978 """Close the file."""
1979 if hasattr(self, '_file'):
1980 try:
1981 if hasattr(self._file, 'close'):
1982 self._file.close()
1983 finally:
1984 del self._file
1985
1986 def _read(self, size, read_method):
1987 """Read size bytes using read_method."""

Callers 1

__exit__Method · 0.95

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected