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__.
Yeah, this is the important point. Even when you're making up defenses for print as a keyword, you intuitively want to use print exactly like a function to demonstrate how it really doesn't matter that it's a keyword... or wait a minute. If Python wants to follow the principle of least astonishment, print should be a function.
1
u/HorrendousRex May 09 '12
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:
might be just fine. Or better yet, import py3k's
printfrom__future__.