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

Fred L. Drake, Jr. fdrake at acm.org
Thu Oct 23 11:18:36 EDT 2003


Barry Warsaw writes:
 > Then again, see my last post.  I'm not sure anything needs to be added
 > to core Python to support useful $-strings.  Or maybe it can be
 > implemented as a library module (or part of a 'textutils' package).

+1 on adding this as a module.

I've managed to implement this a few times, and it would be nice to
just import the same implementation from everywhere I needed it.

One note: calling this "interpolation" (at least when describing it to
end users) is probably a mistake; "substitution" makes more sense to
people not ingrained in communities where it's called interpolation.
It might be ok to call it interpolation for programmers,
but... there's no need for two different names for it.  ;-)


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation



More information about the Python-Dev mailing list