commit | b31a6d0949faecc933754f32ac956bc4aad76fff | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Fri Feb 27 08:09:47 2009 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Fri Feb 27 08:09:47 2009 +0000 |
tree | 05f04f636bea45b71252efe5da8a907a68ffefcb | |
parent | ac10be365e5c25f2bedac75b3269a22f361d51e5 [diff] |
Give mapping views a usable repr.
diff --git a/Lib/_abcoll.py b/Lib/_abcoll.py index 942a72c..40cc23e 100644 --- a/Lib/_abcoll.py +++ b/Lib/_abcoll.py
@@ -371,6 +371,9 @@ def __len__(self): return len(self._mapping) + def __repr__(self): + return '{0.__class__.__name__}({0._mapping!r})'.format(self) + class KeysView(MappingView, Set):