> On Wed, 11 May 2005, Danny Yoo wrote: > > > map(lambda x: x^2, [1, 2, 3]) > > > > [x^2 for x in [1, 2, 3]] > > then we're really saying something like this: > > > > [1, 2, 3] > > | | | > > | | | map() > > | | | > > V V V > > [1, 4, 9] > > You probably don't want to invoke a bitwise exclusive-or here! > > I think Danny meant: > > map(lambda x: x**2, [1, 2, 3]) > [x**2 for x in [1, 2, 3]]
Right, what Terry said. Dear goodness, I'm getting really sloppy these days; I must test my examples. Thanks for catching that for me. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor