changeset: 96013:bde652ae05fd user: Berker Peksag date: Wed May 13 12:16:27 2015 +0300 files: Doc/library/collections.rst description: Issue #24064: Add __doc__ to the example in collections.rst. diff -r ed0d847f61d7 -r bde652ae05fd Doc/library/collections.rst --- a/Doc/library/collections.rst Wed May 13 01:44:36 2015 -0700 +++ b/Doc/library/collections.rst Wed May 13 12:16:27 2015 +0300 @@ -929,9 +929,9 @@ >>> 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: