]> granicus.if.org Git - python/commitdiff
#17265: fix highlight in template example. Initial patch by Berker Peksag.
authorEzio Melotti <ezio.melotti@gmail.com>
Thu, 21 Feb 2013 10:30:32 +0000 (12:30 +0200)
committerEzio Melotti <ezio.melotti@gmail.com>
Thu, 21 Feb 2013 10:30:32 +0000 (12:30 +0200)
Doc/library/string.rst

index 5778980fee154925212fbd4a9d4a6c0732f1236a..81a01fde50d25a90bad08029af5ab4986d3acf70 100644 (file)
@@ -688,7 +688,7 @@ these rules.  The methods of :class:`Template` are:
       This is the object passed to the constructor's *template* argument.  In
       general, you shouldn't change it, but read-only access is not enforced.
 
-Here is an example of how to use a Template:
+Here is an example of how to use a Template::
 
    >>> from string import Template
    >>> s = Template('$who likes $what')
@@ -697,11 +697,11 @@ Here is an example of how to use a Template:
    >>> d = dict(who='tim')
    >>> Template('Give $who $100').substitute(d)
    Traceback (most recent call last):
-   [...]
+   ...
    ValueError: Invalid placeholder in string: line 1, col 11
    >>> Template('$who likes $what').substitute(d)
    Traceback (most recent call last):
-   [...]
+   ...
    KeyError: 'what'
    >>> Template('$who likes $what').safe_substitute(d)
    'tim likes $what'