From: Jamey Cribbs Date: 2005-08-21T12:23:05+09:00 Subject: Re: Python vs Ruby! Jamey Cribbs wrote: > I think I mentioned Python's lambda a paragraph or two above the one > you quoted (I don't have my original post in front of me so I can't > say for sure). You can definitely do closures with Python's lambda, > but it is not as powerful as Ruby's block because a Python lambda can > only have one statement in it and it cannot be an assignment. You > might think that this is not that important. Well, being able to do > assignment(s) in a block allows me to program KirbyBase to handle this: Oops! I should have said, "because a Python lambda can only have an expression, not a statement...". Here's a quote from the Python Tutorial: "They are syntactically restricted to a single expression". And here's a quote from Python's Language Reference: "Note that functions created with lambda forms cannot contain statements". Jamey