Le 8 juin 2012 à 12:34, Stefano Lattarini a écrit :
> On 06/08/2012 12:21 PM, Akim Demaille wrote:
>>
>>>> Every single modern language, especially functional ones,
>>>> have the "return" unnecessary.
>>>>
>>> Not the case for Python.
>>
>> Python is inconsistent on this regard.
>>
>>>>> a = lambda : 14
>>>>> a()
>> 14
>>
> Yeah, lambda functions in python are probably a chief example of
> "practicality beats purity" gone wrong …
Really, I disagree. "return" is superfluous, its sole
role is to break control flow. It's just a matter of
habit, one gets used to it very quickly.
In the example we are discussing about
return;
I would argue that what is explicit should be implicit
(return), and what is implicit should be explicit (the
() value).
undef;