
On Thu, 2003-10-23 at 08:31, François Pinard wrote:
[Guido van Rossum]
Wouldn't this be even better? "create index ${table}_lid1_idx on $table($lid1)" % params
"Better" because it uses `$' instead of `%'? It is really a matter of taste and aesthetics, more than being "better" on technical grounds. Technically, the multiplication of aspects and paradigms goes against some unencumberance and simplicity, which made Python attractive to start with. We would loose something probably not worth the gain.
Better because the trailing type specifier on %-strings is extremely error prone (#1 cause of bugs for Mailman translators is/was leaving off the trailing 's'). Better because the rules for $-strings are simple and easy to explain. Better because the enclosing braces are optional, and unnecessary in the common case, making for much more readable template strings. And yes, better because it uses $ instead of %; it just seems that more people grok that $foo is a placeholder. -Barry