def _guess_autoescape(template_name):
 if ((template_name is None) or ('.' not in template_name)):
  return False
 ext = template_name.rsplit('.', 1)[1]
 return (ext in ['html', 'htm', 'xml'])

def _guess_autoescape ( template_name ) : if ( ( template_name is None ) or ( '.' not in template_name ) ) : return False ext = template_name . rsplit ( '.' , 1 ) [ 1 ] return ( ext in [ 'html' , 'htm' , 'xml' ] )
turn auto-escape on/off based on the file type .