[Python-Dev] Replacement for print in Python 3.0
Stephen J. Turnbull
stephen at xemacs.org
Fri Sep 9 08:29:29 CEST 2005
>>>>> "Greg" == Greg Ewing <greg.ewing at canterbury.ac.nz> writes:
Greg> Stephen J. Turnbull wrote:
>> IMO strings that are being printf'd can probably be assumed to
>> be human readable, and therefore candidates for translation.
Greg> That's a dangerous assumption to make, I think.
Could be. For me, the name "print" is associated with a long history
of magical behavior that only a human could possibly feel comfortable
with. One of the great sins of Pascal was tarring the name "write"
with the same brush!
Greg> I'd be uncomfortable with having some strings in my program
Greg> translated automatically and others not. EIBTI here, I
If printf is going to be part of a magical family of print* functions
that do things like insert interword spacing and EOLs, I have no
problem with documenting that among the other magical things that
printf does, it translates strings. This is no less explicit than any
other function that bundles several more primitive functions.
If instead, we come up with a sufficiently excellent set of formatting
and interpolation notations that printf isn't magic at all, simply a
function that interprets a precisely defined set of explicit
notations, then i18n should have its own notation, too.
On reviewing the thread, the latter seems to be the direction things
are going. Although several people have defended print's magical
behaviors, most of them (and several others) seem at least as excited
about a printf with a more economical yet powerful set of operators.
School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.
More information about the Python-Dev