Re:Python 2.x vs 3.x use survey
by dded on Tuesday December 31, 2013 @11:28AM
(#6991274)
A list comprehension would work for GP, who wants a calculator. But others like to try out snippets of code in the REPL before using them in programs, and in that case you want the code to be the same.
Would the following work? It's been a while since I've had Py3 installed, so I can't casually try it. In your PYTHONSTARTUP, place the following:
Would the following work? It's been a while since I've had Py3 installed, so I can't casually try it. In your PYTHONSTARTUP, place the following:
So you get lists in interactive mode, but iterators in actual scripts.