def displayhook(self, obj): if obj is not None and not isinstance(obj, list): return pprint.pprint(obj) return Pdb.displayhook(self, obj)