[Python-Dev] Replacement for print in Python 3.0
p.f.moore at gmail.com
Fri Sep 2 17:36:39 CEST 2005
On 9/2/05, Steven Bethard <steven.bethard at gmail.com> wrote:
> the print function seems to be intended mainly for newbies and simple
I think there have been quite a few comments here from people who
*don't* see the print statement  as "mainly for newbies and simple
debugging". But just to be absolutely clear, I find the print
statement useful in general code - not just debugging code, not
trivial scripts. I don't consider myself a "newbie". I hesitate to
speak for others, but I believe that I'm not the only one in this
 Sorry, you said "print function". But you seem to be aiming the
function as able to address everyone's concerns over features they
like in the print *statement* so I think my point stands.
Oh, yes - I also know about the "warts" in print (the >> syntax, and
the trailing comma). They don't bother me - I use them on occasion and
find them useful, rather than annoying.
Yes, I know about stream.write and its variations. I know I can write
a print function which adds spaces. Nevertheless, I still find the
print statement more convenient, easier to understand and read, and
frankly, not as ugly. *This is a personal opinion*. You aren't going
to change my mind, and nor are you under any obligation to try. I
won't discard Python if print is dropped, but I will be a little
> I'm having trouble coming up with examples where this is
> really necessary. I'd like to see a few examples where it's crucial
> that the final newline is suppressed.
No-one is saying "crucial". We're just expressing opinions. But so are
those (even Guido!) who want to remove the print statement. No-one has
come up with a genuine, objective benefit to removing it (that I can
see). If there isn't one, then we're left with preferences, and
Guido's trumps everyone else's. You (as someone who agrees with Guido)
don't have anything to prove. Those of us who want to change Guido's
mind need to impress him with the strength of our opinions :-).
Sorry about that - I just get a bit tired of feeling like everyone's
characterising me as either a newbie, or as not writing "real" code...
More information about the Python-Dev