[Python-Dev] Replacement for print in Python 3.0
nyamatongwe at gmail.com
Sun Sep 4 12:34:01 CEST 2005
> > Interactive use is its own mode and works differently to the base
> > language. To print the value of something, just type an expression.
> Doesn't do the same thing.
In interactive mode, you are normally interested in the values of
things, not their formatting so it does the right thing. If you need
particular formatting or interpretation, you can always achieve this.
> Do you have any suggestion that's as practically usable
> as "print"?
The print function proposal is already as usable as the print
statement. When I write a print statement, I'd like to be able to
redirect that to a log or GUI easily. If print is a function then its
interface can be reimplemented but users can't add new statements to
Creation of strings containing values could be simplified as that
would be applicable in many cases. I actually like being able to
append to strings in Java with the second operand being stringified.
Perhaps a stringify and catenate operator could be included in Python.
MessageBox("a=" ° a ° "pos=" ° x°","°y)
More information about the Python-Dev