Exemple #1
0
 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)
Exemple #2
0
 def _eval(self, template):
     values = {
         'foo': 'bar',
         'baz': 'BaR',
     }
     functions = {
         'lower': str.lower,
         'len': len,
     }
     return functemplate.Template(template).substitute(values, functions)