5 ms·
I think people would prefer "from __past__ import print_statement" in 3.x.
by sp332 13y ago
I think people would prefer "from __past__ import print_statement" in 3.x.
- d0vs 13y agoWhy the hell?
- sp332 13y agoI don't know, but it bugs people. https://news.ycombinator.com/item?id=6987309 https://news.ycombinator.com/item?id=6987309 https://news.ycombinator.com/item?id=6985792 https://news.ycombinator.com/item?id=6985792
- trwired 13y agoI would hazard a guess that it is because the statement allows for easily adding a `print varname` in your code while debugging.
- randlet 13y agoIt's two extra chars to write print(varname). One if your editor auto-inserts matching parens!
- dragonwriter 13y agoprint(varname) is one extra keystroke -- and a whole more convenient than a statement when you want to do it in a lambda for debugging.
- viraptor 13y agoThat'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?