[Python-Dev] Replacement for print in Python 3.0

skip@pobox.com skip at pobox.com
Sat Sep 3 04:17:15 CEST 2005


    Guido> Is it...

    Guido> - Going from statement to function?
    Guido> - Losing the automatically inserted space?
    Guido> - Having to write more to get a newline appended?
    Guido> - Losing the name 'print'?

You forgot

    - gratuitous breakage?

I realize you're talking about Py3K, so breakage is allowed, but the
advantages of a print function/method over the current print statement don't
seem sufficient to warrant the level of code change (probably simple but
tedious) that will be necessary to convert 2.x to 3.x.

    Guido> Consider this: if Python *didn't* have a print statement, but it
    Guido> had a built-in function with the same functionality (including,
    Guido> say, keyword parameters to suppress the trailing newline or the
    Guido> space between items); would anyone support a proposal to make it
    Guido> a statement instead?

Nope, but there is a large body of code out there that does use print
statements already.  Again, I know you're prepared for breakage, but that
doesn't necessarily mean a completely blank sheet of paper.

Skip


More information about the Python-Dev mailing list