Newbie ?:A more concise way?
Brian
brian at lodoss.org
Mon Mar 4 04:30:34 EST 2002
Carel Fellinger <cfelling at iae.nl> wrote in message news:<a5um79$ict$1 at animus.fel.iae.nl>...
> >>> class MyClass: pass
> >>> z = map(lambda x: C(), range(3))
Ahh, thank you very much. For some reason this was eluding me
earlier. Clearly I need to spend more time with lambda, map & friends
;-)
I'm happy with the performance of the expression too; I'm using a
similar map expression as an argument to Numeric.array() now and it
works very well for me.
(Aside: Numeric is fun to play with!)
More information about the Python-list
mailing list