MCPcopy Create free account
hub / github.com/ipython/ipython / __enter__

Method __enter__

IPython/core/builtin_trap.py:39–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

37 }
38
39 def __enter__(self):
40 if self._nested_level == 0:
41 self.activate()
42 self._nested_level += 1
43 # I return self, so callers can use add_builtin in a with clause.
44 return self
45
46 def __exit__(self, type, value, traceback):
47 if self._nested_level == 1:

Callers

nothing calls this directly

Calls 1

activateMethod · 0.95

Tested by

no test coverage detected