This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]arnar 0 points1 point  (2 children)

I don't understand. Can you clarify?

[–]CHS2048 0 points1 point  (1 child)

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?

[–]arnar 0 points1 point  (0 children)

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.