commit | 07ae83f8400702a78825204751604b98b6f69c65 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Fri Dec 14 19:19:59 2007 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Fri Dec 14 19:19:59 2007 +0000 |
tree | 857a958d537304f4a4709e70b5a31c2352ed1619 | |
parent | adbda844d0782a64a278561f08bdf7b0d8218bdb [diff] [blame] |
Faster and simpler _replace() method
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index d5f4283..d782c69 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst
@@ -402,7 +402,7 @@ def _replace(self, **kwds): 'Return a new Point object replacing specified fields with new values' - return Point(**dict(zip(('x', 'y'), self), **kwds)) + return Point(*map(kwds.get, ('x', 'y'), self)) x = property(itemgetter(0)) y = property(itemgetter(1))