|
It became a function because it always should have been one. However, since it wasn't always a function, they didn't have the common sense to pick a NEW function name (puts, println, write, writeln, echo, say, show, ...) and politely deprecate the old print syntax. Shortsighted and pointless. |
This way people will actually switch. Programmers won't change without being forced.
Also, Python 3 was their one chance to break backwards compatibility. And there are so many breaking changes in there that people will have to change their codebase to work with Py3k anyway. Your suggestion just delays breaking compatibility (or actually, causes a later release to break backwards compatibility when it wouldn't have been necessary otherwise) ...unless you're arguing for keeping the old print in indefinitely. Why deprecate it then? And old cruft with "oh, we have that but don't use it" labels attached is definitely confusing. And the label would be ignored by too many "that's-the-way-I've-learned-it-and-it-still-works-so-whats-the-problem" programmers.
This is one of the most trivial changes 2to3 makes; it can be done 100% reliably statically, it's very local and very mechanical, and if you don't get it right you get a syntax error on startup (instead of exceptions at runtime (e.g. unicode strings) or even different behavior (e.g. integer division)). The print statement->function change is just not that big of a problem when updating codebases to py3k. It's very visible (because everyone knows print), but the other changes will take much more work and be much harder to debug, so why get hung up over it?