Protect builtins from code in some environment.
More...
|
def | __init__ (self) |
|
def | __enter__ (self) |
| Enter a code segment that should not chane builtins.
|
|
def | __exit__ (self, type, value, traceback) |
| Leave a code segment that should not change builtins. More...
|
|
def | add_builtin (self, key, value) |
| Add a builtin and save the original. More...
|
|
def | remove_builtin (self, key, orig) |
| Remove an added builtin and re-set the original. More...
|
|
def | activate (self) |
| Store ipython references in the builtin namespace. More...
|
|
def | deactivate (self) |
| Remove any builtins which might have been added by add_builtins, or restore overwritten ones to their previous values. More...
|
|
Protect builtins from code in some environment.
◆ __exit__()
def builtin_trap.BuiltinTrap.__exit__ |
( |
|
self, |
|
|
|
type, |
|
|
|
value, |
|
|
|
traceback |
|
) |
| |
Leave a code segment that should not change builtins.
- Parameters
-
◆ activate()
def builtin_trap.BuiltinTrap.activate |
( |
|
self | ) |
|
Store ipython references in the builtin namespace.
◆ add_builtin()
def builtin_trap.BuiltinTrap.add_builtin |
( |
|
self, |
|
|
|
key, |
|
|
|
value |
|
) |
| |
Add a builtin and save the original.
◆ deactivate()
def builtin_trap.BuiltinTrap.deactivate |
( |
|
self | ) |
|
Remove any builtins which might have been added by add_builtins, or restore overwritten ones to their previous values.
◆ remove_builtin()
def builtin_trap.BuiltinTrap.remove_builtin |
( |
|
self, |
|
|
|
key, |
|
|
|
orig |
|
) |
| |
Remove an added builtin and re-set the original.
The documentation for this class was generated from the following file:
- logic/jupyterkernel/builtin_trap.py