it only works the other way -- 2.7+ allows both
print("hello")
print "hello"
while 3+ allows only print("hello") print("hello")
print "hello"
while 3+ allows only print("hello") from __future__ import print_function
to get the print("hello") behaviour.What the import from __future__ does is make the original non-parens version illegal syntax in Python 2. You have to treat it like a function call with that import.
>>> print "foo", 1, 2, "bar", "baz"
foo 1 2 bar baz
>>> print("foo", 1, 2, "bar", "baz")
('foo', 1, 2, 'bar', 'baz')
>>> from __future__ import print_function
>>> print("foo", 1, 2, "bar", "baz")
foo 1 2 bar bazIn the particular case of a print statement, the grouping parens disambiguate between the comma meaning multiple args and a single arg that's a tuple, once Python 2 implicitly wraps the entire right side with function calling parens.
In the end it's really a form of operator precedence. The from __future__ version behaves differently only because the function calling parens are now explicit and so tuple grouping parens must be added too if desired.
airbears2-10-142-34-161:~ ecx$ echo 'print("hello")' >0.py
airbears2-10-142-34-161:~ ecx$ python2.7 0.py
hello
airbears2-10-142-34-161:~ ecx$ python2.7 -V
Python 2.7.10