Home
last modified time | relevance | path

Searched refs:safe_substitute (Results 1 – 7 of 7) sorted by relevance

/external/python/cpython2/Lib/test/
Dtest_string.py267 eq(s.safe_substitute(d), '%(foo)s baz baz')
274 eq(s.safe_substitute(d), 'tim has eaten 7 bags of ham today')
283 eq(s.safe_substitute(d), "('tim', 'fred') ate ('ham', 'kung pao')")
288 eq(s.safe_substitute(dict(who='tim')), 'tim likes ${what} for ${meal}')
289 eq(s.safe_substitute(dict(what='ham')), '$who likes ham for ${meal}')
290 eq(s.safe_substitute(dict(what='ham', meal='dinner')),
292 eq(s.safe_substitute(dict(who='tim', what='ham')),
294 eq(s.safe_substitute(dict(who='tim', what='ham', meal='dinner')),
343 self.assertRaises(ValueError, s.safe_substitute, {})
375 self.assertEqual(t.safe_substitute(), tmpl)
[all …]
/external/autotest/client/site_tests/firmware_TouchMTB/
Dreport_html.py76 self.doc = Template(self.doc.safe_substitute(head=self._html_head(),
95 vlog_content = self.validator_template.safe_substitute(
113 gesture = self.gesture_template.safe_substitute(
124 new_table = self.table.safe_substitute(gestures=gestures)
125 new_doc = self.doc.safe_substitute(test_version=test_version,
/external/python/cpython2/Lib/
Dstring.py178 def safe_substitute(*args, **kws): member in Template
/external/python/cpython2/Doc/tutorial/
Dstdlib2.rst91 :meth:`~string.Template.safe_substitute` method may be more appropriate ---
100 >>> t.safe_substitute(d)
/external/python/cpython2/Doc/library/
Dstring.rst694 .. method:: safe_substitute(mapping[, **kws])
704 raising an exception. In another sense, :meth:`safe_substitute` may be
731 >>> Template('$who likes $what').safe_substitute(d)
/external/python/cpython2/Doc/whatsnew/
D2.4.rst201 raise a :exc:`KeyError`. There's also a :meth:`safe_substitute` method that
205 >>> t.safe_substitute({'page':3})
/external/python/cpython2/Misc/
DHISTORY2264 - Patch #1056967 changes the semantics of Template.safe_substitute() so that