PEP 312 - Making lambdas implicit worries me, surely it's just the name 'lambda' that is bad...
Sean Ross
sross at connectmail.carleton.ca
Sun Mar 2 11:44:39 EST 2003
How about "do", instead of "fn"?:
sum = do a, b: a + b
or, if you want blocks,
total = do seq:
amt = 0
for i in seq:
amt += i
return amt
This would be similar to ruby blocks, except there would be no end statement
and the block parameters would not be piped ( do |seq|: ... ). I'm not sure
about
how to handle the indentation, i.e., should it be as above, where you indent
once
beyond "do" or
total = do seq:
amt = 0
for i in seq:
amt += i
return amt
where you indent once beyond the current indentation level.
Whatever...
just a passing thought,
Sean
More information about the Python-list
mailing list