Notes on Identifiers

Jinja2 uses the regular Python 2.x naming rules. Valid identifiers have tomatch [a-zA-Z][a-zA-Z0-9]*. As a matter of fact non ASCII charactersare currently not allowed. This limitation will probably go away as soon asunicode identifiers are fully specified for Python 3.

Filters and tests are looked up in separate namespaces and have slightlymodified identifier syntax. Filters and tests may contain dots to groupfilters and tests by topic. For example it’s perfectly valid to add afunction into the filter dict and call it to.unicode. The regularexpression for filter and test identifiers is[a-zA-Z][a-zA-Z0-9](.[a-zA-Z][a-zA-Z0-9])*`.