Searched refs:safe_substitute (Results 1 – 6 of 6) sorted by relevance
/third_party/python/Lib/test/ |
D | test_string.py | 245 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 …]
|
/third_party/python/Lib/ |
D | string.py | 123 def safe_substitute(self, mapping=_sentinel_dict, /, **kws): member in Template
|
/third_party/python/Doc/tutorial/ |
D | stdlib2.rst | 91 :meth:`~string.Template.safe_substitute` method may be more appropriate --- 100 >>> t.safe_substitute(d)
|
/third_party/python/Doc/library/ |
D | string.rst | 771 .. method:: safe_substitute(mapping={}, /, **kwds) 781 raising an exception. In another sense, :meth:`safe_substitute` may be 808 >>> Template('$who likes $what').safe_substitute(d)
|
/third_party/python/Doc/whatsnew/ |
D | 2.4.rst | 201 raise a :exc:`KeyError`. There's also a :meth:`safe_substitute` method that 205 >>> t.safe_substitute({'page':3})
|
/third_party/python/Misc/ |
D | HISTORY | 19648 - Patch #1056967 changes the semantics of Template.safe_substitute() so that
|