Commit 89fc2b78 authored by Raymond Hettinger's avatar Raymond Hettinger

Give mapping views a usable repr.

parent 3177f2fd
......@@ -392,6 +392,9 @@ class MappingView(Sized):
def __len__(self):
return len(self._mapping)
def __repr__(self):
return '{0.__class__.__name__}({0._mapping!r})'.format(self)
class KeysView(MappingView, Set):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment