t = TemplateClone('$hi sir')
t.substitute({'hi': 'hello'})
ta = TemplateAlternative('[-hi-] sir')
ta.substitute({'hi': 'have a nice day'})
ta = TemplateAlternative('[--[-hi-]-]')
ta.substitute({'hi': 'have a nice day'})
Example of subclassing string.Template in Python?