[Python-Dev] Replacement for print in Python 3.0

rzed rzantow at ntelos.net
Tue Sep 6 16:58:53 CEST 2005


Guido van Rossum <guido at python.org> wrote:

[...]

 > OK, still with me? This, together with the observation that the only
 > use cases for the delimiter are space and no space, suggests that we
 > should have separate printing APIs for each of the use cases (a), (b)
 > and (c) above, rather than trying to fold (b) into (a) using a way to
 > parameterize the separator (and the trailing newline, to which the
 > same argument applies). For example:
 >
 > (a) print(...)
 > (b) printraw(...) or printbare(...)
 > (c) printf(fmt, ...)
 >
 > Each can take a keyword parameter to specify a different stream than
 > sys.stdout; but no other options are needed. The names for (a) and (c)
 > are pretty much fixed by convention (and by the clamoring when I
 > proposed write() :-). I'm not so sure about the best name for (b), but
 > I think picking the right name is important.

Applying the same reasoning as above, why not remove the last remaining
keyword parameter by adding fprint(ftobj,...) fprintraw( ftobj,...) and
fprintf(ftobj,fmt,...) functions?

-- 
rzed


More information about the Python-Dev mailing list