On 5 September 2013 11:20, Albert-Jan Roskam <fo...@yahoo.com> wrote: >> from __future__ import division, print_function > > Assuming I never use the arguments of the print function, why also import > print_function? print("something") works no matter if 'print' is a statement > or a function.
The problem is when you want to print more than one thing i.e. print(a, b) vs print a, b While the former isn't an error in Python 2.x it prints the tuple (a, b) with brackets which will break any doctest. The latter form is a syntax error in 3.x that would be dealt with by the 2to3 fixer except you're trying to use a single codebase so that won't work for you. Oscar _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor