Raymond Hettinger wrote: > """Placeholders must be a valid Python identifier (containing only ASCII > alphanumeric characters and an underscore). If an unbraced identifier > ends with a non-ASCII alphanumeric character, such as the latin letter n > with tilde in $maƱana, then a ValueError is raised for the specious > identifier. so why keep the python identifier limitation? the RE engine you're using to parse the template has a concept of "alphanumeric character". just define the placeholder syntax as "one or more alphanumeric characters or under- scores" (\w+), use re.UNICODE if the template is created from a unicode string, and you're done. this doesn't mean that people *have* to use non-ASCII characters, of course. but if they do, things just work. </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4