Home
last modified time | relevance | path

Searched refs:safe_substitute (Results 1 – 18 of 18) 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/python/cpython3/Lib/test/
Dtest_string.py245 eq(s.safe_substitute(d), '%(foo)s baz baz')
252 eq(s.safe_substitute(d), 'tim has eaten 7 bags of ham today')
261 eq(s.safe_substitute(d), "('tim', 'fred') ate ('ham', 'kung pao')")
266 eq(s.safe_substitute(dict(who='tim')), 'tim likes ${what} for ${meal}')
267 eq(s.safe_substitute(dict(what='ham')), '$who likes ham for ${meal}')
268 eq(s.safe_substitute(dict(what='ham', meal='dinner')),
270 eq(s.safe_substitute(dict(who='tim', what='ham')),
272 eq(s.safe_substitute(dict(who='tim', what='ham', meal='dinner')),
307 self.assertEqual(s.safe_substitute(d), 'fredHO likes ${WHAT} for dinner')
359 self.assertRaises(ValueError, s.safe_substitute, {})
[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/swiftshader/third_party/llvm-7.0/llvm/tools/sancov/
Dcoverage-report-server.py146 response = string.Template(INDEX_PAGE_TMPL).safe_substitute(
170 response = string.Template(CONTENT_PAGE_TMPL).safe_substitute(
/external/libpcap/testprogs/
Dvisopts.py231 …html = html_template.safe_substitute(expr=expr.encode("string-escape"), gcount=gcount, logs=json.d…
/external/linux-kselftest/tools/testing/selftests/tc-testing/plugin-lib/
DnsPlugin.py140 subcmd = tcmd.safe_substitute(self.args.NAMES)
/external/python/cpython3/Lib/
Dstring.py134 def safe_substitute(*args, **kws): member in Template
/external/adhd/scripts/audio_thread_log_viewer/
Dviewer_c3.py378 filled = page_template.safe_substitute(
/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/cpython3/Doc/tutorial/
Dstdlib2.rst91 :meth:`~string.Template.safe_substitute` method may be more appropriate ---
100 >>> t.safe_substitute(d)
/external/linux-kselftest/tools/testing/selftests/tc-testing/
Dtdc.py112 subcmd = tcmd.safe_substitute(NAMES)
/external/python/cpython3/Doc/library/
Dstring.rst733 .. method:: safe_substitute(mapping, **kwds)
743 raising an exception. In another sense, :meth:`safe_substitute` may be
770 >>> Template('$who likes $what').safe_substitute(d)
/external/python/cpython2/Doc/library/
Dstring.rst695 .. method:: safe_substitute(mapping[, **kws])
705 raising an exception. In another sense, :meth:`safe_substitute` may be
732 >>> Template('$who likes $what').safe_substitute(d)
/external/python/cpython3/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/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
/external/python/cpython3/Misc/
DHISTORY19648 - Patch #1056967 changes the semantics of Template.safe_substitute() so that