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

Gael Varoquaux gael.varoquaux@normalesup....
Sat Aug 15 10:20:18 CDT 2009

On Sat, Aug 15, 2009 at 11:14:13AM -0400, Ralf Gommers wrote:
>    No objections here, but wouldn't it be a lot easier to do this on the
>    whole code base at once (with 2to3 for example) rather than in the doc
>    wiki? Saves you a lot of effort and makes sure we don't have both forms at
>    the same time for a while.

Will 2to3 act on the docstrings?

But anyhow, IMHO, this is more a question of enforcing good practice on
beginners by example than actual code. We will not be running 2to3
anytime soon, but we can start teaching (by example) people to use
parenthesis on print statements now.

We came up with this idea as I was preparing the tutorial for scipy. We
realized that teaching beginners to use 'print(1)' was probably a good

Disclamer: I am sitting 2 meters (6 feet) away from Emmanuelle, working
on docs and tutorial too.


More information about the Scipy-dev mailing list