it's not difficult, but it is the wrong direction for the language to move in. Ham-fisted correctness over readability? WTF python devs .... I'm sticking to the 2.7 branch as long as I can ...
Hey, what do you know, you're right! I'm sorry I made that claim without checking it out. I assumed that as a rvalue it would be evaluated as a function reference, but it's a part of the syntax so it does indeed just error out. Thanks for teaching me something.
It could be useful in some circumstances I suppose where functions are passed first-class in to the arguments of other functions, to print out the order the callbacks are being called in. Although at that point I can't help but feel that something like:
lambda x: print x
might be just fine. Or better yet, import py3k's print from __future__.
if parenthesis and correctness mattered more than readability, we would all be using LISP, I use python for that "import antigravity" feeling of irrational exuberance illustrated in the xkcd comic. Anyway I tend to use the logging module for the cases where you need to pass something like print around.
How often do you really do that? In those few cases, there are tons of workarounds.
Having print be a function might be the "right" decision, but it's still incredible annoying and makes debugging slower. Oh, and 9 times out of 10, setting a trace and using the python debugger is not faster than adding a line or two of print, no matter how many times you try to say otherwise.
The gain is next to zero but the losses are massive. Having print a keyword was the right decision.
Stop playing stupid. It is annoying and slower (editing the code), the typical excuse though is "don't use print for debugging!" but that's a bad excuse because using print:s is most of the time an easier way of debugging code.
I'm not playing stupid. I can't imagine the difference between print and print() ever being significant enough to notice. Hell, I've had tendonitis reduce me to 1-handed, hunt-and-peck typing and it still wasn't even a big deal. Of all the gripes about Python 3, this is the only one (off the top of my head, at least) that I just can't even begin to understand.
48
u/Fissionary May 09 '12 edited May 09 '12
Not in the latest version of Python, it isn't. It will work in Basic, though.
The simplicity of the Hello World program is not a good indicator of the power of a language.