summaryrefslogtreecommitdiffstats
path: root/Doc/library/collections.rst
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-01-06 09:02:24 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-01-06 09:02:24 (GMT)
commit1166872006157361df619c431459f03bf6b27f74 (patch)
tree6bef9f142abc48ab6e58fcd98314d64957d832dc /Doc/library/collections.rst
parenteb94d4c3e3c3649518cfc85872ffd5870d6f5403 (diff)
downloadcpython-1166872006157361df619c431459f03bf6b27f74.zip
cpython-1166872006157361df619c431459f03bf6b27f74.tar.gz
cpython-1166872006157361df619c431459f03bf6b27f74.tar.bz2
Small code simplification. Forgot that classmethods can be called from intances.
Diffstat (limited to 'Doc/library/collections.rst')
-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 eaa823a..0205cf1 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -410,7 +410,7 @@ Example::
def _replace(self, **kwds):
'Return a new Point object replacing specified fields with new values'
- result = self.__class__._make(map(kwds.pop, ('x', 'y'), self))
+ result = self._make(map(kwds.pop, ('x', 'y'), self))
if kwds:
raise ValueError('Got unexpected field names: %r' % kwds.keys())
return result