[IronPython] list of lambdas only evaluates first expression

Matt Beckius mbeckius at gmail.com
Mon Jan 9 08:03:34 PST 2006


>>> l = [lambda x : x**2, lambda y : y**3, lambda z : z**4]
>>> for x in l :  print x(2)
4
4
4

Matt B.

--
Matt Beckius
610.308.8827
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/users-ironpython.com/attachments/20060109/a45717e8/attachment.htm


More information about the users mailing list