Is Python Lazy?
Dan Stromberg
drsalists at gmail.com
Sun May 6 01:40:59 EDT 2012
Generators and iterators are laziness where you tend to need laziness the
most. Generator expressions are tiny generators - more full fledged
generators are supported.
Python probably won't have laziness at its core ever, but it's nice having
a dose of it. IOW, you probably won't be able to write a sort routine, and
use it as a "first 100 lowest values" routine for free. But you could
construct something that does almost the same thing lazily using a
generator - not for free.
On Sat, May 5, 2012 at 9:19 PM, Emeka <emekamicro at gmail.com> wrote:
>
> Hello All,
>
> Could one say that generator expressions and functions are Python way of
> introducing Lazy concept?
>
> Regards, \Emeka
> --
> *Satajanus Nig. Ltd
>
>
> *
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120505/5a1ed929/attachment-0001.html>
More information about the Python-list
mailing list