Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 651453a

Browse files
committed
Clean-up named tuple docs.
1 parent 465c802 commit 651453a

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Doc/library/collections.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,8 @@ function:
755755
>>> getattr(p, 'x')
756756
11
757757

758-
To convert a dictionary to a named tuple, use the double-star-operator [#]_:
758+
To convert a dictionary to a named tuple, use the double-star-operator
759+
(as described in :ref:`tut-unpacking-arguments`):
759760

760761
>>> d = {'x': 11, 'y': 22}
761762
>>> Point(**d)
@@ -803,10 +804,10 @@ and more efficient to use a simple class declaration:
803804
>>> class Status:
804805
... open, pending, closed = range(3)
805806

806-
.. rubric:: Footnotes
807+
.. seealso::
807808

808-
.. [#] For information on the double-star-operator see
809-
:ref:`tut-unpacking-arguments` and :ref:`calls`.
809+
`Named tuple recipe <http://code.activestate.com/recipes/500261/>`_
810+
adapted for Python 2.4.
810811

811812

812813

0 commit comments

Comments
 (0)