Confessions of a Python fanboy

Xavier Ho contact at xavierho.com
Fri Jul 31 04:31:43 EDT 2009


On Fri, Jul 31, 2009 at 6:25 PM, Chris Rebert <clp2 at rebertia.com> wrote:

> I believe "full" anonymous functions was intended by the author.
> lambdas are limited to a single expression. "Full" anonymous functions
> would be allowed to contain multiple statements.
>
> Cheers, but what about this:

 def goBig(x):
    while True:
        x = x ** 2
        yield x

for result in goBig(10):
    if result > 10 ** 100:
        break
    print result

It's a silly example, but wouldn't goBig(10) in this example be a "full
anonymous function"?

Just being curious.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090731/df0d8a3a/attachment-0001.html>


More information about the Python-list mailing list