From: Berker Peksag Date: Wed, 13 May 2015 09:16:27 +0000 (+0300) Subject: Issue #24064: Add __doc__ to the example in collections.rst. X-Git-Tag: v3.5.0b1~162 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de7cafaa63db3849d11b1d17195ee23eacad7325;p=thirdparty%2FPython%2Fcpython.git Issue #24064: Add __doc__ to the example in collections.rst. --- diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 892f05ddf36c..e27774cb9407 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -929,9 +929,9 @@ fields: >>> Book = namedtuple('Book', ['id', 'title', 'authors']) >>> Book.__doc__ = 'Hardcover book in active collection' - >>> Book.id = '13-digit ISBN' - >>> Book.title = 'Title of first printing' - >>> Book.author = 'List of authors sorted by last name' + >>> Book.id.__doc__ = '13-digit ISBN' + >>> Book.title.__doc__ = 'Title of first printing' + >>> Book.author.__doc__ = 'List of authors sorted by last name' Default values can be implemented by using :meth:`_replace` to customize a prototype instance: