mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
fixed a few instances of old-style string formatting
This commit is contained in:
@@ -64,8 +64,8 @@ class OrderedDict(dict, MutableMapping):
|
||||
|
||||
def __repr__(self):
|
||||
if not self:
|
||||
return '%s()' % (self.__class__.__name__,)
|
||||
return '%s(%r)' % (self.__class__.__name__, list(self.items()))
|
||||
return '{0}()'.format(self.__class__.__name__,)
|
||||
return '{0}({1})'.format(self.__class__.__name__, repr(list(self.items())))
|
||||
|
||||
def copy(self):
|
||||
return self.__class__(self)
|
||||
|
||||
Reference in New Issue
Block a user