'``autoescape`` must be either None or a string naming a function
in the template namespace, such as "xhtml_escape".'

def __init__(self, autoescape=_DEFAULT_AUTOESCAPE, namespace=None):

    self.autoescape = autoescape
    self.namespace = (namespace or {})
    self.templates = {}
    self.lock = threading.RLock()
