I haven't followed the template threads very closely, but reading the pep/implementation it clearly looks useful. I don't know if I like the method names substitute/safe_substitute though. * Too long 10/15 character names for something so simple it up until now just needed a %? Programs using templates will probably use them frequently... I'd prefer sub instead of substitute. * Safe? safe_substitution doesn't tell you much upon first glance. Safe? In what way? You could even argue that the "plain" version really is the safer one, as you'll notice typos and thus get a more solid program. I think a name hinting that this method uses the var name as a fallback would be better, but can't think of (a short) one... defaultsub? fallbacksub? loosesub? Guess I could live with safe, but... Erik
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