[Python-3000] Add python-3000-like print function to python 2.6 (original) (raw)

Neal Norwitz nnorwitz at gmail.com
Tue Oct 16 22:59:15 CEST 2007


On 10/16/07, Fred Drake <fdrake at acm.org> wrote:

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

There's a patch for this too. http://bugs.python.org/issue1633807

n



More information about the Python-3000 mailing list