anonymous function objects?

gabriele renzi surrender_it at remove-yahoo.it
Thu Apr 28 19:35:33 EDT 2005


Uwe Mayer ha scritto:
> Friday 29 April 2005 00:06 am Paul Rubin wrote:
> 
>>Closest you can come is:
>>
>>   f = lambda: sys.stdout.write("hello world\n")
> 
>  
> Ah. :))
> Why does the "print" statement return a syntax error here?
>                      ^^^^^^^^^
> 

this is the reason :)
You can't have statements into an expression



More information about the Python-list mailing list