summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2007-12-14 19:19:59 (GMT)
committerRaymond Hettinger <python@rcn.com>2007-12-14 19:19:59 (GMT)
commit07ae83f8400702a78825204751604b98b6f69c65 (patch)
tree857a958d537304f4a4709e70b5a31c2352ed1619 /Doc
parentadbda844d0782a64a278561f08bdf7b0d8218bdb (diff)
downloadcpython-07ae83f8400702a78825204751604b98b6f69c65.zip
cpython-07ae83f8400702a78825204751604b98b6f69c65.tar.gz
cpython-07ae83f8400702a78825204751604b98b6f69c65.tar.bz2
Faster and simpler _replace() method
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/collections.rst2
1 files changed, 1 insertions, 1 deletions
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 @@ Example::
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))