diff options
author | Raymond Hettinger <python@rcn.com> | 2009-02-11 00:20:02 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-02-11 00:20:02 (GMT) |
commit | 651453ace09e6677d8fea66d3cbbf8614b109f16 (patch) | |
tree | 8a968d9a93baadda14dce6ad27b9eb5bcc022987 /Doc/library/collections.rst | |
parent | 465c802044a5d9367997b4030e3435722c811911 (diff) | |
download | cpython-651453ace09e6677d8fea66d3cbbf8614b109f16.zip cpython-651453ace09e6677d8fea66d3cbbf8614b109f16.tar.gz cpython-651453ace09e6677d8fea66d3cbbf8614b109f16.tar.bz2 |
Clean-up named tuple docs.
Diffstat (limited to 'Doc/library/collections.rst')
-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 9ff8a27..a179d0f 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -755,7 +755,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) @@ -803,10 +804,10 @@ 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. |