Hmm, I don't know how I can clarify it, I always wanted python to have anoperator 'lambda=', that work a bit like '+=' or '*=', such that the expression:
x lambda= f
is the same as:
x = f(x)
Was it my comment on decorators you wanted me to clarify?
Ah ok, I see. What's confusing is that what you want has no reason to be called "lambda". Lambdas are for constructing function values, but what you want to do is to call one. Something like
x ()= f
would make more sense terminology-wise since a pair of parentheses are the operator for calling functions (or callables in general).
That said, I don't think it is a good idea. But I dislike += et al. as well.
1
u/CHS2048 Jul 13 '11
I've always wanted an operator 'lambda=', to be used as such:
instead of
before anyone says it, decorators are not good for doing this.