> 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. Brett C. wrote: > I don't think any of this is needed. If a non-programmer is being told > to use string substitution chances are someone is either going to > explain it to them or there will be another set of docs to explain > things in a simple way. I suspect stating exactly what a valid Python > identifier contains as you did in parentheses above will be enough. Also, since Barry has gone to great lengths to make Template overrideable, applications can replace the regular expression in their derived Template class when there is a need to allow for end-users inputing template strings. So, I'd suggest keeping safe_substitute relatively simple, but document the limitation and/or solution. Thanks, -Shane Holloway
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