ID EN
IO

__del__

Python 3.11

Prepare for object destruction. IOBase provides a default implementation of this method that calls the instance’s close() method.

Syntax

PYTHON
__del__()

See Also

IOBase close()