Show More
@@ -80,10 +80,12 b' class BuiltinTrap(Configurable):' | |||
|
80 | 80 | """Add a builtin and save the original.""" |
|
81 | 81 | bdict = __builtin__.__dict__ |
|
82 | 82 | orig = bdict.get(key, BuiltinUndefined) |
|
83 | self._orig_builtins[key] = orig | |
|
84 | 83 | if value is HideBuiltin: |
|
85 | del bdict[key] | |
|
84 | if orig is not BuiltinUndefined: #same as 'key in bdict' | |
|
85 | self._orig_builtins[key] = orig | |
|
86 | del bdict[key] | |
|
86 | 87 | else: |
|
88 | self._orig_builtins[key] = orig | |
|
87 | 89 | bdict[key] = value |
|
88 | 90 | |
|
89 | 91 | def remove_builtin(self, key): |
General Comments 0
You need to be logged in to leave comments.
Login now