[Python-Dev] Can we please have a better dict interpolation s yntax?

Geoffrey Talvola gtalvola at nameconnector.com
Fri Oct 24 11:07:35 EDT 2003


Greg Ewing wrote:
> Guido:
>>> Wouldn't this be even better?
>>>> "create index ${table}_lid1_idx on $table($lid1)" % params
>> I wouldn't object to that. I'd have expected *you* to
> object to it, though, since it re-defines the meaning
> of "$" in an interpolated string. I was just trying
> to suggest something that would be backward-compatible.
>
$ is currently unused in Python AFAIK. So why not:
 "create index ${table}_lid1_idx on $table($lid1)" $ params
No backward compatibility problems at all.
- Geoff


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /