[Python-3000] Add python-3000-like print function to python 2.6
Fred Drake
fdrake at acm.org
Tue Oct 16 22:53:08 CEST 2007
On Oct 16, 2007, at 4:29 PM, Guido van Rossum wrote:
> I expect this will happen. At the very least, you'll be able to just
> use 'print' for that function's name if you include
>
> from __future__ import print_function
>
> at the top of your module. Whether it's worth it to make the same
> function available under a different name that doesn't require such an
> import I'm not sure.
This makes sense to me. Creating a new name for the function doesn't
add anything, IMO: to use it I need to "dirty" my code wherever I
print, using the __future__ import only dirties an isolated spot in a
module that prints. Much better, and probably useful during the
transitional period.
-Fred
--
Fred Drake <fdrake at acm.org>
More information about the Python-3000
mailing list