(self, object, stream, indent, allowance, context, level)
| 499 | _dispatch[_collections.defaultdict.__repr__] = _pprint_default_dict |
| 500 | |
| 501 | def _pprint_counter(self, object, stream, indent, allowance, context, level): |
| 502 | if not len(object): |
| 503 | stream.write(repr(object)) |
| 504 | return |
| 505 | cls = object.__class__ |
| 506 | stream.write(cls.__name__ + '({') |
| 507 | if self._indent_per_level > 1: |
| 508 | stream.write((self._indent_per_level - 1) * ' ') |
| 509 | items = object.most_common() |
| 510 | self._format_dict_items(items, stream, |
| 511 | indent + len(cls.__name__) + 1, allowance + 2, |
| 512 | context, level) |
| 513 | stream.write('})') |
| 514 | |
| 515 | _dispatch[_collections.Counter.__repr__] = _pprint_counter |
| 516 |
nothing calls this directly
no test coverage detected