]> granicus.if.org Git - python/commitdiff
Code beautification using f-strings (#5618)
authorRaymond Hettinger <rhettinger@users.noreply.github.com>
Sun, 11 Feb 2018 16:00:11 +0000 (08:00 -0800)
committerGitHub <noreply@github.com>
Sun, 11 Feb 2018 16:00:11 +0000 (08:00 -0800)
Lib/collections/__init__.py

index 9a753db71caeae47c6a0014f7b59638a410367b9..3109054e20c148e2312fe4b13f01702e7228c5d9 100644 (file)
@@ -933,8 +933,7 @@ class ChainMap(_collections_abc.MutableMapping):
 
     @_recursive_repr()
     def __repr__(self):
-        return '{0.__class__.__name__}({1})'.format(
-            self, ', '.join(map(repr, self.maps)))
+        return f'{self.__class__.__name__}({", ".join(map(repr, self.maps))})'
 
     @classmethod
     def fromkeys(cls, iterable, *args):