[Python-Dev] Replacement for print in Python 3.0

Fredrik Lundh fredrik at pythonware.com
Fri Sep 2 16:11:20 CEST 2005

Steven Bethard wrote:

> 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.

next use case:

    print 'foo:', foo, 'bar:', bar, 'baz:', baz,
    if frobble > 0:
        print 'frobble', frobble
        print 'no frobble today'


More information about the Python-Dev mailing list