devitocodes / devito

DSL and compiler framework for automated finite-differences and stencil computation
http://www.devitoproject.org
MIT License
562 stars 228 forks source link

Print statement #79

Closed mloubout closed 8 years ago

mloubout commented 8 years ago

Hi Please put parenthesis to all the print statements:

print("stuff to print") not print "stuff to print"

The second one makes everything crash with python 3.x

I replaced all of it in my current PR but please remember it for the future.

vincepandolfo commented 8 years ago

Do we have to use Python 3?

mloubout commented 8 years ago

We're not the only one using this, and some (will) use python 3

vincepandolfo commented 8 years ago

Anyway, a good point to make is that we shouldn't use print statements but Devito logger class

FabioLuporini commented 8 years ago

We should never use print. We should rather use the logger module. You can use parentheses in there if you think are needed