Skip to content

Instantly share code, notes, and snippets.

@EntilZha
Created July 16, 2016 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EntilZha/6b81fc9ced2540a5b7acdebc37c66346 to your computer and use it in GitHub Desktop.
Save EntilZha/6b81fc9ced2540a5b7acdebc37c66346 to your computer and use it in GitHub Desktop.
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
/home/user/.local/lib/python3.5/site-packages/IPython/core/formatters.py in __call__(self, obj)
697 type_pprinters=self.type_printers,
698 deferred_pprinters=self.deferred_printers)
--> 699 printer.pretty(obj)
700 printer.flush()
701 return stream.getvalue()
/home/user/.local/lib/python3.5/site-packages/IPython/lib/pretty.py in pretty(self, obj)
381 if callable(meth):
382 return meth(obj, self, cycle)
--> 383 return _default_pprint(obj, self, cycle)
384 finally:
385 self.end_group()
/home/user/.local/lib/python3.5/site-packages/IPython/lib/pretty.py in _default_pprint(obj, p, cycle)
501 if _safe_getattr(klass, '__repr__', None) not in _baseclass_reprs:
502 # A user-provided repr. Find newlines and replace them with p.break_()
--> 503 _repr_pprint(obj, p, cycle)
504 return
505 p.begin_group(1, '<')
/home/user/.local/lib/python3.5/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle)
692 """A pprint that just redirects to the normal repr function."""
693 # Find newlines and replace them with p.break_()
--> 694 output = repr(obj)
695 for idx,output_line in enumerate(output.splitlines()):
696 if idx:
<ipython-input-7-3ed0d2189fc5> in __repr__(self)
1 class Custom:
2 def __repr__(self):
----> 3 raise Exception("oops called repr")
4
5 def _repr_html_(self):
Exception: oops called repr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment