def get_lexer(environment):
 key = (environment.block_start_string, environment.block_end_string, environment.variable_start_string, environment.variable_end_string, environment.comment_start_string, environment.comment_end_string, environment.line_statement_prefix, environment.line_comment_prefix, environment.trim_blocks, environment.newline_sequence)
 lexer = _lexer_cache.get(key)
 if (lexer is None):
  lexer = Lexer(environment)
  _lexer_cache[key] = lexer
 return lexer

def get_lexer ( environment ) : key = ( environment . block_start_string , environment . block_end_string , environment . variable_start_string , environment . variable_end_string , environment . comment_start_string , environment . comment_end_string , environment . line_statement_prefix , environment . line_comment_prefix , environment . trim_blocks , environment . newline_sequence ) lexer = _lexer_cache . get ( key ) if ( lexer is None ) : lexer = Lexer ( environment ) _lexer_cache [ key ] = lexer return lexer
return a lexer which is probably cached .