Earlier quoted context omitted.
I think people would prefer "from __past__ import print_statement" in 3.x.
Why the hell?
Python 2.x vs 3.x use survey
21–30 of 119 posts
Re: Python 2.x vs 3.x use survey
#22The biggest thing that drives me nuts about py3 is just that its repl doesn't evaluate generators. I'm sure they had their reasons, but I use python as my go-to calculator, and when simple operations with maps/ranges give me a representation of a generator ("<map object at ...", whatever), then it's just less useful to me. I could be alone in that use case though...
Re: Python 2.x vs 3.x use survey
#23Missing a question. "Would you switch to python 3 if they brought back the print statement" Edit: I really just like the statement for the interpreter, and IPython Notebook. To me the statement syntax feels less like programming, and more like using a computer.
Personally, I prefer function. I can understand that others have a different preference; what I find surprising is the number of people who seem to care so much about this. Nevertheless, it is very evident that you are not alone.
print() or
into a lambda has been useful on multiple occasions.Re: Python 2.x vs 3.x use survey
#24Earlier quoted context omitted.
What's the specific issue? I find it solves loads of issues before where you could mix bytes and unicode by accident. Not only are they more explicit, I find the fact that `b'\0'[0] == 0` - way better when working with actual bytes.
The inability to use string manipulation functions on bytestrings without converting them to unicode and back for each operation.
Edit: now that I thought about it - since you're able to decode the bytes you're using, it means you are operating on text - why not convert it then?
Re: Python 2.x vs 3.x use survey
#25That's where I stop filling out the survey.
And that's the python community biggest problem. Moving forward, everyone needs to pick a version (and I'd pick 3). A new user just sits and spins his head. Even the training materials are all over the place.
Re: Python 2.x vs 3.x use survey
#26Missing a question. "Would you switch to python 3 if they brought back the print statement" Edit: I really just like the statement for the interpreter, and IPython Notebook. To me the statement syntax feels less like programming, and more like using a computer.
print 'hi', # prints hi (no extra space in the end)
print 'hi',; print 'hi' # prints hi hi
I personally dislike this syntax because I don't find this natural. Wouldn't it make more sense to print an extra space after the print statement with trailing comma instead of before the next print statement?
Re: Python 2.x vs 3.x use survey
#27The biggest thing that drives me nuts about py3 is just that its repl doesn't evaluate generators. I'm sure they had their reasons, but I use python as my go-to calculator, and when simple operations with maps/ranges give me a representation of a generator ("<map object at ...", whatever), then it's just less useful to me. I could be alone in that use case though...
If by evaluate you mean "convert to a list", that's sensible, since a generator may or may not be safe to convert to a list. If you want a list, wrap the generator to a call to the list() builtin function, and, voila.
Re: Python 2.x vs 3.x use survey
#28Re: Python 2.x vs 3.x use survey
#29Earlier quoted context omitted.
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!
Re: Python 2.x vs 3.x use survey
#30Earlier quoted context omitted.
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.