MCPcopy Index your code
hub / github.com/RustPython/RustPython / displayhook

Method displayhook

Lib/pdb.py:368–374  ·  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

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:]

Callers

nothing calls this directly

Calls 2

messageMethod · 0.95
reprFunction · 0.85

Tested by

no test coverage detected