News for hackers. Stuff that matters.
Re:Python 2.x vs 3.x use survey by d0vs on Tuesday December 31, 2013 @10:07AM (#6990775)
Why the hell?
Re:Python 2.x vs 3.x use survey by sp332 on Tuesday December 31, 2013 @10:13AM (#6990809)
Re:Python 2.x vs 3.x use survey by trwired on Tuesday December 31, 2013 @10:34AM (#6990923)
I would hazard a guess that it is because the statement allows for easily adding a `print varname` in your code while debugging.
Re:Python 2.x vs 3.x use survey by randlet on Tuesday December 31, 2013 @10:52AM (#6991040)
It's two extra chars to write print(varname). One if your editor auto-inserts matching parens!
Re:Python 2.x vs 3.x use survey by sp332 on Tuesday December 31, 2013 @10:56AM (#6991067)
Since the space is replaced by the first paren, it's either 0 or 1 more chars :)
Re:Python 2.x vs 3.x use survey by Shish2k on Tuesday December 31, 2013 @12:10PM (#6991497)
Shift-9 is more fiddly to type than space though :P
Re:Python 2.x vs 3.x use survey by dragonwriter on Tuesday December 31, 2013 @11:00AM (#6991101)
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.