MCPcopy Index your code
hub / github.com/python/cpython / displayhook

Method displayhook

Lib/pdb.py:775–781  ·  view source on GitHub ↗

Custom displayhook for the exec in default(), which prevents assignment of the _ variable in the builtins.

(self, obj)

Source from the content-addressed store, hash-verified

773 self.forget()
774
775 def displayhook(self, obj):
776 """Custom displayhook for the exec in default(), which prevents
777 assignment of the _ variable in the builtins.
778 """
779 # reproduce the behavior of the standard displayhook, not printing None
780 if obj is not None:
781 self.message(repr(obj))
782
783 @contextmanager
784 def _enable_multiline_input(self):

Callers

nothing calls this directly

Calls 1

messageMethod · 0.95

Tested by

no test coverage detected