News for hackers. Stuff that matters.
Re:Python 2.x vs 3.x use survey by teddyh on Tuesday December 31, 2013 @10:34AM (#6990924)
Write it as a list comprehension instead; it has identical syntax except for using square brackets instead of parentheses, and returns a list.
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:

  _map = map
  def map(f, *args):
    return list(_map(f, *args))
So you get lists in interactive mode, but iterators in actual scripts.