(self, object, stream, indent, allowance, context, level)
| 378 | _dispatch[_types.MappingProxyType.__repr__] = _pprint_mappingproxy |
| 379 | |
| 380 | def _pprint_simplenamespace(self, object, stream, indent, allowance, context, level): |
| 381 | if type(object) is _types.SimpleNamespace: |
| 382 | # The SimpleNamespace repr is "namespace" instead of the class |
| 383 | # name, so we do the same here. For subclasses; use the class name. |
| 384 | cls_name = 'namespace' |
| 385 | else: |
| 386 | cls_name = object.__class__.__name__ |
| 387 | indent += len(cls_name) + 1 |
| 388 | items = object.__dict__.items() |
| 389 | stream.write(cls_name + '(') |
| 390 | self._format_namespace_items(items, stream, indent, allowance, context, level) |
| 391 | stream.write(')') |
| 392 | |
| 393 | _dispatch[_types.SimpleNamespace.__repr__] = _pprint_simplenamespace |
| 394 |
nothing calls this directly
no test coverage detected