[Python-Dev] Re: 2.4a2, and @decorators
David Eppstein
eppstein at ics.uci.edu
Tue Aug 3 22:22:11 CEST 2004
In article <89EC7888-E580-11D8-8D12-000A95A50FB2 at fuhm.net>,
James Y Knight <foom at fuhm.net> wrote:
> As a postscript, I must say I am alarmed by some comments others have
> used to justify the current restricted state. In particular
> (paraphrased), "it's good because it keeps people from using lambda",
> and "it's good because it keeps people from doing '@1+1' by mistake.
> For the first: you hate lambdas so much?
I think I was the one who posted the lambda comment.
I also posted in a different message a use-case for decorators that had
a line with two lambdas in it, so obviously I don't hate lambdas.
I'm actually pretty neutral on restricted decorators vs @expression. But
@lambda(func): body
def func(...): ...
is (I think) much more likely to be an abuse of language than the
Pythonic way of writing something, so I don't see a lot of harm in
preventing it.
--
David Eppstein
Computer Science Dept., Univ. of California, Irvine
http://www.ics.uci.edu/~eppstein/
More information about the Python-Dev
mailing list