[SciPy-dev] change print statements to print functions in docstrings

Gael Varoquaux gael.varoquaux@normalesup....
Mon Aug 17 01:46:47 CDT 2009

On Sat, Aug 15, 2009 at 06:14:56PM -0500, Robert Kern wrote:
> No, it is *not* a function in Python 2.x. There is no custom logic.
> The fact that "print(1,2,3)" executes is a side effect of the grammar
> not requiring a spacing between "print" and the expression "(1,2,3)".
> It is equivalent to "print (1,2,3)" in Python 2.x and "print((1,2,3))"
> in Python 3.x. Note that it is *not* equivalent to "print(1,2,3)" in
> Python 3.x.

OK, I am confused by the fact that __builtins__ as a print function that
matches the Python 3.x print function. You can see this doing 
'$ pydoc __builtin__.print' and I believe this is what is confusing
IPython too. What you are saying is that that function does not kick in
if we don't do the __future__ import, right?



More information about the Scipy-dev mailing list