diff options
author | Raymond Hettinger <python@rcn.com> | 2009-02-11 00:12:07 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-02-11 00:12:07 (GMT) |
commit | b6b3879a0113ce3db1e335eb0d889281b87f233d (patch) | |
tree | 39c79fbdcdb4f9e08c3960a7c89088c073c1d159 /Doc | |
parent | 07750565c99849a4b3963a40e39541b5ae91f5d0 (diff) | |
download | cpython-b6b3879a0113ce3db1e335eb0d889281b87f233d.zip cpython-b6b3879a0113ce3db1e335eb0d889281b87f233d.tar.gz cpython-b6b3879a0113ce3db1e335eb0d889281b87f233d.tar.bz2 |
Clean-up named tuple docs.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/collections.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index caf3e6d..a860a53 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -637,7 +637,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) @@ -684,7 +685,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. |