Nick Coghlan <ncoghlan at gmail.com> wrote: > With the above changes, the following would work: > "$1: $2".format("Number of bees", "0.5") > And produce: > "Number of bees: 0.5" > > When pre-compiling string.Templates, the keyword method is > significantly clearer, but if the syntax was accessible through a > string method, then being able to use positional arguments would > be very handy. As long as named arguments don't get lost, that's fine. I often use templates stored in variables/passed around as arguments, where the positional form is not clear at all: template.format("Number of bees", "0.5") -- Christian Tanzer http://www.c-tanzer.at/
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