Pretty print mapping views from collections.abc.
(self, object, stream, indent, allowance, context, level)
| 338 | write(self._format_block_end("])", indent)) |
| 339 | |
| 340 | def _pprint_mapping_abc_view(self, object, stream, indent, allowance, context, level): |
| 341 | """Pretty print mapping views from collections.abc.""" |
| 342 | write = stream.write |
| 343 | write(object.__class__.__name__ + '(') |
| 344 | # Dispatch formatting to the view's _mapping |
| 345 | self._format(object._mapping, stream, indent, allowance, context, level) |
| 346 | write(')') |
| 347 | |
| 348 | _dict_keys_view = type({}.keys()) |
| 349 | _dispatch[_dict_keys_view.__repr__] = _pprint_dict_view |