Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there some story behind it? It looks like the smallest issue out of the whole migration. (especially with from __future__ import print_function)


I think people would prefer "from __past__ import print_statement" in 3.x.


That's why I'm asking really - not only those two would be pretty much equivalent, there's really nothing that can be expressed with one, but not the other. I mean that's kind of like saying "would you use it if they called the binary snake instead of python3" - what's the reason apart from personal preference for the syntax?


Why the hell?


I would hazard a guess that it is because the statement allows for easily adding a `print varname` in your code while debugging.


It's two extra chars to write print(varname). One if your editor auto-inserts matching parens!


Since the space is replaced by the first paren, it's either 0 or 1 more chars :)


Shift-9 is more fiddly to type than space though :P


print(varname) is one extra keystroke -- and a whole more convenient than a statement when you want to do it in a lambda for debugging.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: