In article <49c1562a$0$1115$4fafb...@reader1.news.tin.it>,
mattia  <ger...@gmail.com> wrote:
>
>Yeah, and I believe that we can say the same for:
>1 - t = [x*2 for x in range(10)]
>2 - t = list(x*2 for x in range(10))
>or not?

The latter requires generator expressions, which means it only works with
Python 2.4 or higher.  Personally, I think that if the intent is to
create a list you should just use a listcomp instead of list() on a
genexp.
-- 
Aahz (a...@pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Programming language design is not a rational science. Most reasoning
about it is at best rationalization of gut feelings, and at worst plain
wrong."  --GvR, python-ideas, 2009-3-1
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to