[Python-Dev] Replacement for print in Python 3.0

Steven Bethard steven.bethard at gmail.com
Sat Sep 3 19:12:46 CEST 2005


Guido van Rossum wrote:
> If there's demand, we could also introduce printf(), which would work
> just like C's printf() except it takes a keyword argument to redirect
> the output.

I think this is probably unnecessary if string formatting becomes a
function instead of the % operator (as has been suggested).  I don't
think that:

    write("""\
    ERROR: Failed to import handler %s for function %s in file %s.
    Improperly formed foobar string.""".substitute(handler, function, file),
         to=sys.stderr)

is really any worse than:

    printf("""\
    ERROR: Failed to import handler %s for function %s in file %s.
    Improperly formed foobar string.""",
         handler, function, file,
         to=sys.stderr)

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


More information about the Python-Dev mailing list