summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-02-11 00:06:17 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-02-11 00:06:17 (GMT)
commite4ae63c402c46941ffa62f51050442f794d0f16b (patch)
tree412f418fb49724d6278b952637d18ea088021467
parent3689ae256e4b121eec1540ec9cf61d73a131a0e5 (diff)
downloadcpython-e4ae63c402c46941ffa62f51050442f794d0f16b.zip
cpython-e4ae63c402c46941ffa62f51050442f794d0f16b.tar.gz
cpython-e4ae63c402c46941ffa62f51050442f794d0f16b.tar.bz2
Clean-up named tuple docs.
-rw-r--r--Doc/library/collections.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 94fd16c..f32ad76 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -775,7 +775,8 @@ function:
>>> getattr(p, 'x')
11
-To convert a dictionary to a named tuple, use the double-star-operator [#]_:
+To convert a dictionary to a named tuple, use the double-star-operator
+(as described in :ref:`tut-unpacking-arguments`):
>>> d = {'x': 11, 'y': 22}
>>> Point(**d)
@@ -822,7 +823,7 @@ and more efficient to use a simple class declaration:
>>> class Status:
... open, pending, closed = range(3)
-.. rubric:: Footnotes
+.. seealso::
-.. [#] For information on the double-star-operator see
- :ref:`tut-unpacking-arguments` and :ref:`calls`.
+ `Named tuple recipe <http://code.activestate.com/recipes/500261/>`_
+ adapted for Python 2.4.