diff options
author | Raymond Hettinger <python@rcn.com> | 2015-11-09 16:26:28 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-11-09 16:26:28 (GMT) |
commit | 2fbde51e2f6d681d25784d763b9bc0bbc511dbb7 (patch) | |
tree | d46295f80340726961f72c22a37cdc9b94a061a3 /Doc | |
parent | b9d672491d5082c541bf267eb7bb99fdc6529324 (diff) | |
parent | 850be0fb184ee1a5a42df5ecc1b8b62c433b1c6e (diff) | |
download | cpython-2fbde51e2f6d681d25784d763b9bc0bbc511dbb7.zip cpython-2fbde51e2f6d681d25784d763b9bc0bbc511dbb7.tar.gz cpython-2fbde51e2f6d681d25784d763b9bc0bbc511dbb7.tar.bz2 |
merge
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/collections.rst | 4 | ||||
-rw-r--r-- | Doc/whatsnew/3.5.rst | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 2e2e16f..30193ee 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -929,10 +929,10 @@ Docstrings can be customized by making direct assignments to the ``__doc__`` fields: >>> Book = namedtuple('Book', ['id', 'title', 'authors']) - >>> Book.__doc__ = 'Hardcover book in active collection' + >>> Book.__doc__ += ': Hardcover book in active collection' >>> Book.id.__doc__ = '13-digit ISBN' >>> Book.title.__doc__ = 'Title of first printing' - >>> Book.author.__doc__ = 'List of authors sorted by last name' + >>> Book.authors.__doc__ = 'List of authors sorted by last name' Default values can be implemented by using :meth:`_replace` to customize a prototype instance: diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst index 29d76b1..f3db22f 100644 --- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -865,7 +865,7 @@ and improves their substitutability for lists. Docstrings produced by :func:`~collections.namedtuple` can now be updated:: Point = namedtuple('Point', ['x', 'y']) - Point.__doc__ = 'ordered pair' + Point.__doc__ += ': Cartesian coodinate' Point.x.__doc__ = 'abscissa' Point.y.__doc__ = 'ordinate' |