3 ms·
If you type `func "arg"`, you get a generic syntax error. If you type `print "arg"`, the syntax error is a bit more informative, but I wouldn't say that the co
by saila 4y ago
If you type `func "arg"`, you get a generic syntax error.
If you type `print "arg"`, the syntax error is a bit more informative, but I wouldn't say that the compiler "understands" what you mean. It's just making a guess based on the fact that the previous token was "print".
On the other hand, supporting a special call syntax just for print, which includes more than just parentheses, would be substantially more complex. And then Python code in the wild would be more inconsistent and there will be endless debates about `print <args>` versus `print(<args>)`.