diff options
author | Georg Brandl <georg@python.org> | 2009-10-27 13:12:17 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-10-27 13:12:17 (GMT) |
commit | 5e921502603c1ba22bac18b223240fea84bbc6dc (patch) | |
tree | a120f5eea2028d18c108db7fea36fd2d54c93fb8 /Doc | |
parent | 641d76fad084ba0545fc17b0344d1326e68202a2 (diff) | |
download | cpython-5e921502603c1ba22bac18b223240fea84bbc6dc.zip cpython-5e921502603c1ba22bac18b223240fea84bbc6dc.tar.gz cpython-5e921502603c1ba22bac18b223240fea84bbc6dc.tar.bz2 |
Merged revisions 68605 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68605 | raymond.hettinger | 2009-01-14 02:39:51 +0100 (Mi, 14 Jan 2009) | 1 line
Fix-up indentation of sample code blocks for namedtuple mthod definitions.
........
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/collections.rst | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 0b4be8c..b4b537b 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -590,7 +590,7 @@ field names, the method and attribute names start with an underscore. Class method that makes a new instance from an existing sequence or iterable. -.. doctest:: + .. doctest:: >>> t = [11, 22] >>> Point._make(t) @@ -606,9 +606,7 @@ field names, the method and attribute names start with an underscore. .. method:: somenamedtuple._replace(kwargs) Return a new instance of the named tuple replacing specified fields with new - values: - -:: + values:: >>> p = Point(x=11, y=22) >>> p._replace(x=33) @@ -622,7 +620,7 @@ field names, the method and attribute names start with an underscore. Tuple of strings listing the field names. Useful for introspection and for creating new named tuple types from existing named tuples. -.. doctest:: + .. doctest:: >>> p._fields # view the field names ('x', 'y') |