diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-02-21 10:35:40 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-02-21 10:35:40 (GMT) |
commit | 4d6795e1a2655c70494ba892072cedc002ccce9a (patch) | |
tree | ebcf6d835f1d485afb88cf917e29faa0b2b39895 | |
parent | 79b99dba0f538a14101eefc232d44f268f2e47be (diff) | |
parent | bcbc5678d55b62c695479d2f57e0c31c81b8eca7 (diff) | |
download | cpython-4d6795e1a2655c70494ba892072cedc002ccce9a.zip cpython-4d6795e1a2655c70494ba892072cedc002ccce9a.tar.gz cpython-4d6795e1a2655c70494ba892072cedc002ccce9a.tar.bz2 |
#17265: merge with 3.2.
-rw-r--r-- | Doc/library/string.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst index fa8d9e4..0d50760 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -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' |