(obj, p, cycle)
| 845 | |
| 846 | |
| 847 | def _counter_pprint(obj, p, cycle): |
| 848 | name = obj.__class__.__name__ |
| 849 | with p.group(len(name) + 1, name + '(', ')'): |
| 850 | if cycle: |
| 851 | p.text('...') |
| 852 | elif len(obj): |
| 853 | p.pretty(dict(obj)) |
| 854 | |
| 855 | for_type_by_name('collections', 'defaultdict', _defaultdict_pprint) |
| 856 | for_type_by_name('collections', 'OrderedDict', _ordereddict_pprint) |