(self, object, stream, indent, allowance, context, level)
| 236 | _dispatch[dict.__repr__] = _pprint_dict |
| 237 | |
| 238 | def _pprint_ordered_dict(self, object, stream, indent, allowance, context, level): |
| 239 | if not len(object): |
| 240 | stream.write(repr(object)) |
| 241 | return |
| 242 | cls = object.__class__ |
| 243 | stream.write(cls.__name__ + '(') |
| 244 | self._format(list(object.items()), stream, |
| 245 | indent + len(cls.__name__) + 1, allowance + 1, |
| 246 | context, level) |
| 247 | stream.write(')') |
| 248 | |
| 249 | _dispatch[_collections.OrderedDict.__repr__] = _pprint_ordered_dict |
| 250 |