
On Aug 3, 2004, at 4:22 PM, David Eppstein wrote:
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.
Ah, I'm sorry then. I have noticed many people seem to be quite biased against lambdas here, so I just assumed.
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.
Oh, I agree, it's quite silly to write a piece of code like that, and if anyone wrote it in code I have to maintain I'd probably be quite irritated. So, if the conclusion to this is "well, we can always unrestrict it later, if someone comes up with a convincing use-case", then it'll likely never be changed, because I doubt that's gonna happen. The best I can do is foo().bar(), which I suspect at least one person will run into at some point and wonder about, then work around instead of presenting it to python-dev. My main argument is and has been simply: that's how everything else in python works, so this should be the same. Last message on this subject, I think everyone got the point by now and is either convinced or not. :) James