Base pprint for all functions and builtin functions.
(obj, p, cycle)
| 802 | |
| 803 | |
| 804 | def _function_pprint(obj, p, cycle): |
| 805 | """Base pprint for all functions and builtin functions.""" |
| 806 | name = _safe_getattr(obj, '__qualname__', obj.__name__) |
| 807 | mod = obj.__module__ |
| 808 | if mod and mod not in ('__builtin__', 'builtins', 'exceptions'): |
| 809 | name = mod + '.' + name |
| 810 | try: |
| 811 | func_def = name + str(signature(obj)) |
| 812 | except ValueError: |
| 813 | func_def = name |
| 814 | p.text('<function %s>' % func_def) |
| 815 | |
| 816 | |
| 817 | def _exception_pprint(obj, p, cycle): |
nothing calls this directly
no test coverage detected
searching dependent graphs…