I can’t
SyntaxError: lambda cannot contain assignment
Sorry, forgot that assignment is not an operation but considered a statement in python. You would need to have a function for setting the variable. If your class already has a setter for that variable you can call that in the lambda.
i.e)
lambda evt: self.SetAttr(None)
Cody
···
On Aug 18, 2008, at 7:02 AM, Prashant Saxena wrote:
I can't
SyntaxError: lambda cannot contain assignment
Sorry, forgot that assignment is not an operation but considered a statement in python. You would need to have a function for setting the variable. If your class already has a setter for that variable you can call that in the lambda.
i.e)
lambda evt: self.SetAttr(None)
Also, even if you don't have a setter, you can use the python built-in setattr function ... i.e. for the given example