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

Method __enter__

tools/python-3.11.9-amd64/Lib/_pyio.py:510–513  ·  view source on GitHub ↗

Context management protocol. Returns self (an instance of IOBase).

(self)

Source from the content-addressed store, hash-verified

508 ### Context manager ###
509
510 def __enter__(self): # That's a forward reference
511 """Context management protocol. Returns self (an instance of IOBase)."""
512 self._checkClosed()
513 return self
514
515 def __exit__(self, *args):
516 """Context management protocol. Calls close()"""

Callers

nothing calls this directly

Calls 1

_checkClosedMethod · 0.95

Tested by

no test coverage detected