[Python-Dev] Replacement for print in Python 3.0

Steven Bethard steven.bethard at gmail.com
Fri Sep 2 16:04:07 CEST 2005


skip at pobox.com wrote:
> I don't find either the trailing comma or >> redirection ugly.  If I have a
> long print line that's hard to read because it extends past column 80 (the
> print statement, not the output), it's easy to hit NL at an intermediate
> comma, then just type "print ", perhaps followed by another output
> redirector.  The two print statements' output still falls on a single
> line. The trailing comma on the previous line gives me a space between the
> two output chunks.

But that would be just as easy with a print() function.  In the current syntax:

    print 'foo:', foo, 'bar:', bar, 'baz:', baz,
    print 'frobble', frobble

In my proposed function:

    print('foo:', foo, 'bar:', bar, 'baz:', baz,
          'frobble', frobble)

To my (admittedly biased) eyes, the second version more obviously
prints to a single line.

STeVe
-- 
You can wordify anything if you just verb it.
        --- Bucky Katt, Get Fuzzy


More information about the Python-Dev mailing list