On Apr 22, 2014 10:55 AM, "Benjamin Piwowarski" <[email protected]> wrote:
>
> There is not much to do for python 3 compatibility, but still… I attached
the patch this time.
>
> Benjamin
I have one comment and one question regarding this patch.
The comment: if we're only concerned with supporting Python 2.7 and up, we
could include the statement "from __future__ import print_function" in any
file in which we use the print function, as this allows us to use all of
the features of the Python 3.X print function and avoids some potentially
unwanted behavior when printing multiple values. For example, in Python
2.X, "print 'Alice', 'Bob'" prints the line "Alice Bob", but
"print('Alice', 'Bob')" prints the line "('Alice', 'Bob')", since the
parentheses are not interpreted as enclosing the arguments for a function,
but as demarcating a tuple.
The question: why are we switching from opening files in binary mode to
opening files in text "t" mode? Was there a reason that we were using
binary mode in the first place?
Josh