Ian Bicking <[EMAIL PROTECTED]> wrote:
> 
> Josiah Carlson wrote:
> > One of the features of generator expressions which makes it desireable
> > instead of list comprehensions is that generator expressions may use
> > less memory *now*, and may be able to start returning results *now*.
> > 
> > Using (<genexp> orderby ...) as a replacement for sorted((genexp), key=...)
> > is a bit misleading because while the original generator expression
> > could have been space and time efficient, the orderby version certainly may
> > not be.
> 
> Certainly it changes the performance substantially (of course if the 
> expression is translated and executed elsewhere the performance can 
> actually be improved, so it can go both ways).

I think that discussions over farming out sorted(genexp) computation is
a little premature, and I would hope that such would be explicit in any
case.

 - Josiah

_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to