[Python-Dev] Can we please have a better dict interpolation
syntax?
Skip Montanaro
skip at pobox.com
Thu Oct 23 11:22:40 EDT 2003
Barry> On Thu, 2003-10-23 at 09:55, Skip Montanaro wrote:
>> What if lid1 is a float which you want to display with two digits
>> past the decimal point?
Barry> BTW, I should mention that IMO, $-strings are great for end-user
Barry> editable string templates, such as (in Mailman) things like
Barry> translatable strings or message footer templates.
...
Barry> Then again, see my last post. I'm not sure anything needs to be
Barry> added to core Python to support useful $-strings. Or maybe it
Barry> can be implemented as a library module (or part of a 'textutils'
Barry> package).
+1. If it's not something programmers will use (most of the time, anyway)
there's no need to build it into the language. If programmers like it, it's
only another module to import. In addition, I'm fairly certain such a
module could be made compatible with Python as far back as 1.5.2 without a
lot of effort. You also have the freedom to make it much more flexible (use
of templates and so forth) if it's in a separate module.
Skip
More information about the Python-Dev
mailing list