MCPcopy Create free account
hub / github.com/ipython/ipython / _function_pprint

Function _function_pprint

IPython/lib/pretty.py:709–719  ·  view source on GitHub ↗

Base pprint for all functions and builtin functions.

(obj, p, cycle)

Source from the content-addressed store, hash-verified

707
708
709def _function_pprint(obj, p, cycle):
710 """Base pprint for all functions and builtin functions."""
711 name = _safe_getattr(obj, '__qualname__', obj.__name__)
712 mod = obj.__module__
713 if mod and mod not in ('__builtin__', 'builtins', 'exceptions'):
714 name = mod + '.' + name
715 try:
716 func_def = name + str(signature(obj))
717 except ValueError:
718 func_def = name
719 p.text('<function %s>' % func_def)
720
721
722def _exception_pprint(obj, p, cycle):

Callers

nothing calls this directly

Calls 2

_safe_getattrFunction · 0.85
textMethod · 0.45

Tested by

no test coverage detected