Custom displayhook for the exec in default(), which prevents assignment of the _ variable in the builtins.
(self, obj)
| 420 | self.forget() |
| 421 | |
| 422 | def displayhook(self, obj): |
| 423 | """Custom displayhook for the exec in default(), which prevents |
| 424 | assignment of the _ variable in the builtins. |
| 425 | """ |
| 426 | # reproduce the behavior of the standard displayhook, not printing None |
| 427 | if obj is not None: |
| 428 | self.message(repr(obj)) |
| 429 | |
| 430 | def default(self, line): |
| 431 | if line[:1] == '!': line = line[1:] |