[Python-3000] Add python-3000-like print function to python 2.6
Guido van Rossum
guido at python.org
Tue Oct 16 22:29:07 CEST 2007
On 10/16/07, David A. Wheeler <dwheeler at dwheeler.com> wrote:
> In Python 2.6, could some print FUNCTION be added to the builtins, using a different name than "print" but with the Python 3000 semantics? Call it printfunc or whatever.
>
> Python 3000 is undergoing much pain so that print can become a function. How about making those benefits available sooner than 3.0, so that we can use them earlier? Obviously people can create their own such function, but having a STANDARD name for it would mean that 2to3 could easily automate that translation. Plus, it'd help people get used to the idea of a printing _function_.
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.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list