Why do this?
Lawrence D'Oliveiro
ldo at geek-central.gen.new_zealand
Mon Oct 9 00:16:27 EDT 2006
In message <mailman.1339.1160044890.10491.python-list at python.org>, Tim
Golden wrote:
> [Matthew Warren]
> | But nowadays, I see things like this all over the place;
> |
> | print("There are %s ways to skin a %s" % (number, furryanimal))
>
> The outermost brackets are (at the moment) unnecessary in python,
> altho' print is slated for replacement by a function in Python 3.0
> at which point they'll be necessary.
Why bother? What would then be the advantage of using print over
sys.stdout.write?
I thought the existing print statement was a convenience for interactive
use, newbie tutorials and the like. If it's going to become a function, why
not use the function that's already there?
More information about the Python-list
mailing list