Pep 3105: the end of print?

Steven Bethard steven.bethard at gmail.com
Thu Feb 15 17:06:54 EST 2007


Edward K Ream wrote:
> The pros and cons of making 'print' a function in Python 3.x are well
> discussed at:
> 
> http://mail.python.org/pipermail/python-dev/2005-September/056154.html
> 
> Alas, it appears that the effect of this pep would be to make it impossible
> to use the name 'print' in a backward compatible manner.

You could offer up a patch for Python 2.6 so that you can do::

    from __future__ import print_function

and have the 'print' statement replaced by the 'print' function.

That said, why can't you use ``file.write()`` instead of ``print``? 
While I use print quite frequently in interactive use, it's pretty much 
nonexistent in all my real code.

STeVe



More information about the Python-list mailing list