[Python-Dev] Replacement for print in Python 3.0

Bill Janssen janssen at parc.com
Sun Sep 4 00:49:36 CEST 2005

Guido writes:
> * Gratuitous breakage: IMO it's not gratuitous. The *extensions* to
> the print statement (trailing comma, >>stream) are ugly, and because
> it's all syntax, other extensions are hard to make. Had it been a
> function from the start it would have been much easier to add keyword
> args, for example.

So here's the summary of the arguments against: two style points
(trailing comma and >>stream) (from the man who approved the current
decorator syntax!), and it's hard to extend.  (By the way, I agree that
the ">>" syntax is ugly, and IMO a bad idea in general.  Shame the "@"
wasn't used instead. :-)

Seems pretty weak to me.  Are there other args against?

What baffles me is that when I read through the rest of PEP 3000, I
agree with the other changes.  But removing "print" sticks in my craw,
and there's no real justification for it.  I just don't get it.

If someone said, "print" doesn't support a format argument as C printf
does, I'd say that's a strong argument.  But an argument for extending
"print" once again, not junking it.  Unless it was perhaps replaced

>>> printf @sys.stderr %"Must output %s at once!" "important message"


More information about the Python-Dev mailing list