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

Method deactivate

IPython/core/builtin_trap.py:79–86  ·  view source on GitHub ↗

Remove any builtins which might have been added by add_builtins, or restore overwritten ones to their previous values.

(self)

Source from the content-addressed store, hash-verified

77 add_builtin(name, func)
78
79 def deactivate(self):
80 """Remove any builtins which might have been added by add_builtins, or
81 restore overwritten ones to their previous values."""
82 remove_builtin = self.remove_builtin
83 for key, val in self._orig_builtins.items():
84 remove_builtin(key, val)
85 self._orig_builtins.clear()
86 self._builtins_added = False

Callers 1

__exit__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected