[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question on difference between LambdaType and FunctionType

> Why are lambda functions not instrumented?

Because, if I didn't forget about anything, assignment
in lambdas is invalid. That is,

     lambda self. self.x = 1


     lambda self: (self.x = 1)

will throw SyntaxError. Therefore, I don't have to worry
that someone will attempt to mutate the object from lambda.

Iwo Herka