summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-01-14 01:39:51 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-01-14 01:39:51 (GMT)
commit2950bca89c10374c767f0b6b7a3cba6e9f80686a (patch)
treefc1443dcb1ce7ad6e21bcbedb4f89138b4949ba9
parentafd112baef3cb8718cca724fe91910af6291577e (diff)
downloadcpython-2950bca89c10374c767f0b6b7a3cba6e9f80686a.zip
cpython-2950bca89c10374c767f0b6b7a3cba6e9f80686a.tar.gz
cpython-2950bca89c10374c767f0b6b7a3cba6e9f80686a.tar.bz2
Fix-up indentation of sample code blocks for namedtuple mthod definitions.
-rw-r--r--Doc/library/collections.rst8
1 files changed, 3 insertions, 5 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index fc2b802..f024843 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -724,7 +724,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)
@@ -740,9 +740,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)
@@ -756,7 +754,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')