Hacker News new | ask | show | jobs
by ciupicri 5763 days ago
They might be using RHEL (Red Hat Enterprise Linux) which comes with Python 2.4 and in 2.4 you can't use print as a function.

LE: python 2.5 -> 2.4 (bconway was right)

2 comments

Two corrections:

A.) RHEL 5.x (by default) comes with Python 2.4, not 2.5.

B.) Yes you can. It is required in 3.x, though.

Well you can't use it as a function. You can however combine the parsing of the "print" keyword, and the "(" and ")" taking precedence around the string to form KEYWORD STRING that looks a hell of a lot like a function call though.
Actually, print(one single argument) works the same in both Python 2 and 3.
Do you mean as in x = (x) = ((x)) = ...? In this case you're right, although it's still not a function.