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

Method __del__

tools/python-3.11.9-amd64/Lib/_pyio.py:1622–1627  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1620 self._fd = fd
1621
1622 def __del__(self):
1623 if self._fd >= 0 and self._closefd and not self.closed:
1624 import warnings
1625 warnings.warn('unclosed file %r' % (self,), ResourceWarning,
1626 stacklevel=2, source=self)
1627 self.close()
1628
1629 def __getstate__(self):
1630 raise TypeError(f"cannot pickle {self.__class__.__name__!r} object")

Callers

nothing calls this directly

Calls 2

closeMethod · 0.95
warnMethod · 0.45

Tested by

no test coverage detected