Interesting talk on Python vs. Ruby and how he would like Python to have just a bit more syntactic flexibility.

Terry Reedy tjreedy at udel.edu
Wed Feb 17 14:50:32 EST 2010


On 2/17/2010 1:51 PM, cjw wrote:
> On 17-Feb-10 05:48 AM, Bruno Desthuilliers wrote:
>> Lawrence D'Oliveiro a écrit :
>>> In message <60b1abce-4381-46ab-91ed-
>>> f2ab2154c0a1 at g19g2000yqe.googlegroups.com>, Andrej Mitrovic wrote:
>>>
>>>> Also, lambda's are expressions, not statements ...
>>>
>>> Is such a distinction Pythonic, or not?
>>
>> Python is (by design) a statement-based language, so yes, this
>> distinction is pythonic !-)
> Aren't lambda forms better described as function?

They are expressions that evaluate to function objects nearly identical 
to that produced by the def statememt they abbreviate. The only 
difference is the .__name__ attribute.

Terry Jan Reedy







More information about the Python-list mailing list