On Dec 21, 2010, at 1:37 PM, cjrh wrote: > > On Dec 21, 10:36 pm, pbreit <pbreitenb...@gmail.com> wrote: >> I see lambda used quite a bit and don't totally understand the concept. Is >> there a simple rule to follow to know when it is necessary to use? >
Another answer to the original question is that there are places in the web2py API where a function is called for. For example, when you define a Field, you can supply a represent=something argument to override the default representation. The "something" needs to be a function, and a lambda expression is often a handy way to provide one.