g Peshone wrote:Yes, it is working now. Wonder why they changed the syntax?
One reason was apparently because the old print was a command, but the new print() is a function (
http://www.linuxjournal.com/content/python-python-python-aka-python-3):
Linux Journal wrote:Of course, the obvious questions have to be asked: "Why introduce a change like this at all?" and "Why did the Python developers break most every existing Python program?".
It's possible to answer both of these questions with one answer: because it made sense to do so. The 2.x print command was always used as if it were a function, even though it was a command, which meant it was classed in with the likes of while, if, try, def and else, when it probably shouldn't have been. In Python, all function names have a trailing (), such as int(), input(), float(), range() and so on. As print was always more of a function than a command, it becomes print() in Python 3 which, of course, makes perfect sense, even though it breaks all that code!
They've also changed the formatted print from an old C-style approach to a more functional/flexible approach using
string format templates and functions.