[Python-3000] String formating operations in python 3k

Bill Janssen janssen at parc.com
Wed Apr 5 05:12:57 CEST 2006


> +1 for {} over the $/${} dichotomy -- it's easier to explain, as well  
> as more readable.

Perhaps I'm just allergic to bash/perl/java/ruby syntax, but the more
I follow this discussion, the more I like the current string
formatting system :-).

It seems to me that the core of the issue is the current insistence,
with %(NAME)FORMAT, on a trailing format type which is frequently
forgotten.  Why not just remove that insistence, and use %(foo) in
py3k?  Code will break, sure, but we're going to expect that.  If you
really need to control the presentation, put that information inside
the parens, as in %(foo:.3f).  But let it default to "s".

There are other issues, such as the need to construct a dictionary,
for which reasonable approaches have been offered over the last week.

Bill



More information about the Python-3000 mailing list