Base pprint for all functions and builtin functions.
(obj, p, cycle)
| 707 | |
| 708 | |
| 709 | def _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 | |
| 722 | def _exception_pprint(obj, p, cycle): |
nothing calls this directly
no test coverage detected