Ian Bicking wrote:
> FWIW, I suspect I'd be much more likely to use named %'s with .format()
> than with %; which is probably good, since named markers are more
> flexible.
If we're going to encourage use of named arguments
(which I think we should) I think we also need to
get rid of the need for %(foo)s constructs, which
are extremely error-prone and hard to read.
I'm -0.7 on having two different formatting
styles (one using % and the other using $) with
partially-overlapping functionality. In Py3k
there should be OOWTDI.
I'm also not all that keen on $, either inside
or outside the string. It seems to me that
something like
"User {user} has printed {n} pages"
sets off the parameters from the rest of the
string more readably than
"User $user has printed $n pages"
There are various ways that the traditional
%-formatting parameters could be incorporated,
e.g.
"Answer {num:d,5} is {result:f,8,3}"
--
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | Carpe post meridiam! |
Christchurch, New Zealand | (I'm not a morning person.) |
[EMAIL PROTECTED] +--------------------------------------+
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com