def _eval(self, template): values = { u'foo': u'bar', u'baz': u'BaR', } functions = { u'lower': six.text_type.lower, u'len': len, } return functemplate.Template(template).substitute(values, functions)
def _eval(self, template): values = { 'foo': 'bar', 'baz': 'BaR', } functions = { 'lower': str.lower, 'len': len, } return functemplate.Template(template).substitute(values, functions)