Fix __repr__ method of the StrictDict (#1424)

This commit is contained in:
Stefan Wójcik
2016-12-04 16:10:59 -05:00
committed by GitHub
parent eb743beaa3
commit 15714ef855
2 changed files with 17 additions and 8 deletions

View File

@@ -438,7 +438,7 @@ class StrictDict(object):
__slots__ = allowed_keys_tuple
def __repr__(self):
return "{%s}" % ', '.join('"{0!s}": {0!r}'.format(k) for k in self.iterkeys())
return "{%s}" % ', '.join('"{0!s}": {1!r}'.format(k, v) for k, v in self.items())
cls._classes[allowed_keys] = SpecificStrictDict
return cls._classes[allowed_keys]