[IronPython] list of lambdas only evaluates first expression

Matt Beckius mbeckius at gmail.com
Mon Jan 9 17:03:34 CET 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: <http://mail.python.org/pipermail/ironpython-users/attachments/20060109/a45717e8/attachment.html>


More information about the Ironpython-users mailing list