From: Raymond Hettinger Date: Wed, 11 Feb 2009 00:12:07 +0000 (+0000) Subject: Clean-up named tuple docs. X-Git-Tag: v2.6.2c1~179 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b6b3879a0113ce3db1e335eb0d889281b87f233d;p=thirdparty%2FPython%2Fcpython.git Clean-up named tuple docs. --- diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index caf3e6dcfada..a860a53a7197 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 `_ + adapted for Python 2.4.