Custom displayhook for the exec in default(), which prevents assignment of the _ variable in the builtins.
(self, obj)
| 366 | self.forget() |
| 367 | |
| 368 | def displayhook(self, obj): |
| 369 | """Custom displayhook for the exec in default(), which prevents |
| 370 | assignment of the _ variable in the builtins. |
| 371 | """ |
| 372 | # reproduce the behavior of the standard displayhook, not printing None |
| 373 | if obj is not None: |
| 374 | self.message(repr(obj)) |
| 375 | |
| 376 | def default(self, line): |
| 377 | if line[:1] == '!': line = line[1:] |