On Tue, 2006-04-04 at 14:28 +1200, Greg Ewing wrote: > 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.
In general, I agree.
> 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.
Except that there really are two things going on here. One is
formatting and the other is insertion. I agree it's awkward to have two
styles, but I would really hate to complicate the latter to support the
former. Maybe those who are advocating moving away from in-place
substitution as the mechanism for formatting have the right idea.
> 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"
Here i disagree. $-strings are so familiar to people coming from other
languages that they instantly "get it".
-Barry
signature.asc
Description: This is a digitally signed message part
_______________________________________________ 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
