File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -688,7 +688,7 @@ these rules. The methods of :class:`Template` are:
688688 This is the object passed to the constructor's *template * argument. In
689689 general, you shouldn't change it, but read-only access is not enforced.
690690
691- Here is an example of how to use a Template:
691+ Here is an example of how to use a Template::
692692
693693 >>> from string import Template
694694 >>> s = Template('$who likes $what')
@@ -697,11 +697,11 @@ Here is an example of how to use a Template:
697697 >>> d = dict(who='tim')
698698 >>> Template('Give $who $100').substitute(d)
699699 Traceback (most recent call last):
700- [ ...]
700+ ...
701701 ValueError: Invalid placeholder in string: line 1, col 11
702702 >>> Template('$who likes $what').substitute(d)
703703 Traceback (most recent call last):
704- [ ...]
704+ ...
705705 KeyError: 'what'
706706 >>> Template('$who likes $what').safe_substitute(d)
707707 'tim likes $what'
You can’t perform that action at this time.
0 commit comments