[Tutor] map() and lambda to change class instance attribute

Bernard Lebel 3dbernard at gmail.com
Wed May 11 19:32:55 CEST 2005


Hello,

Let say I have several class instances in a list, and these class
instances have an attribute named "value", whose value is an integer.

I would like to know if it is possible to loop over the list of
instances to change their "value" attribute, using a map( (
lambda:...), ... ) type of loop. I'm very new to lambdas as you can
see :-)


Thanks
Bernard


More information about the Tutor mailing list