[Python-ideas] @return?
spir ☣
denis.spir at gmail.com
Wed Apr 14 23:51:57 CEST 2010
On Wed, 14 Apr 2010 17:41:43 +0100
Conrad Irwin <conrad.irwin at googlemail.com> wrote:
> Changing things so that return isn't necessary at all would also solve
> the problem, and quite nicely, but I think that's a far-too-drastic
> change in semantics.
Well actually, in _many_ languages the last expression is taken as return value.
(Not only Lisp & friends, also pure OO ones like Io.)
Python 9000 ;-)
factorial = function(n):
if n <= 1:
1
else:
factorial(n-1)
cubes = map(numbers, function(x) x*x*x)
Denis
________________________________
vit esse estrany ☣
spir.wikidot.com
More information about the Python-ideas
mailing list