And semantically,
... lambda <parameters> : <expression> ...
acts as if this had been written instead:
def a_unique_name( <parameters> ):
return <expression>
... a_unique_name ...
> ...
> Tim said [lambda] was in the FAQ, but I didn't grep it.
> Maybe he meant the NEWS file.
No, lambda isn't in the FAQ; FAQ question 4.5 is "why can't a nested
function access the local variables of the outer function"? Because of
the semantic model above, that's a supremely relevant question. A full
explanation of namespaces is in 4.1 of the language reference manual.
> [ xrange is also mentioned in the Misc/NEWS file, but I didn't
> see any mention of it in the library manual. ]
grep'ing the doc .tex files for "xrange" strikes out.
efficiently y'rs - tim
Tim Peters tim@ksr.com
not speaking for Kendall Square Research Corp