MCPcopy Index your code
hub / github.com/python/cpython / AmpersandTemplate

Class AmpersandTemplate

Lib/test/test_string/test_string.py:488–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486 eq = self.assertEqual
487 raises = self.assertRaises
488 class AmpersandTemplate(Template):
489 delimiter = '&'
490 s = AmpersandTemplate('this &gift is for &{who} &&')
491 eq(s.substitute(gift='bud', who='you'), 'this bud is for you &')
492 raises(KeyError, s.substitute)

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…