Ask a question to get started
Enter to send•Shift+Enter new line
Tokenize a mustache template.
Tokenizes a mustache template in a generator fashion, using file-like objects. It also accepts a string containing the template.
tokenize( template: str, def_ldel: str = '{{', def_rdel: str = '}}' ) -> Iterator[tuple[str, str]]
template
str
a file-like object, or a string of a mustache template
def_ldel
'{{'
The default left delimiter ('{{' by default, as in spec compliant mustache)
def_rdel
'}}'
The default right delimiter ('}}' by default, as in spec compliant mustache)