Implement SlotDict.__repr__() to behave like dict.
authorZac Medico <zmedico@gentoo.org>
Fri, 4 Jun 2010 17:12:37 +0000 (10:12 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 4 Jun 2010 17:12:37 +0000 (10:12 -0700)
pym/portage/cache/mappings.py

index 67f6dfcc6148885e81b6e404ce5fbafb9ce1b2b8..0ef5c3ac6afaea0562f69faffe119d480f527f79 100644 (file)
@@ -497,6 +497,9 @@ def slot_dict_class(keys, prefix="_val_"):
                        def __str__(self):
                                return str(dict(self.iteritems()))
 
+                       def __repr__(self):
+                               return repr(dict(self.iteritems()))
+
                        if sys.hexversion >= 0x3000000:
                                items = iteritems
                                keys = __iter__