[Python-Dev] Replacement for print in Python 3.0
Guido van Rossum
guido at python.org
Thu Sep 1 19:56:58 CEST 2005
On 9/1/05, Raymond Hettinger <raymond.hettinger at verizon.net> wrote:
> > Do we really need writef()? It seems to be not much better than its %-
> > formatting
> > equivalent.
> Actually, formatting needs to become a function. The overloading of the
> arithmetic mod operator has proven to be unfortunate (if only because of
> precedence issues).
For me, it's not so much the precedence, but the fact that "%s" % x
doesn't work as expected if x is a tuple; you'd have to write "%s" %
(x,) which is tedious.
> Also, the format coding scheme itself needs to be revisited. There is
> no shortage of people who have taken issue with the trailing s in
Maybe the syntax used in the string.Template class is the way to go?
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev