>
> An extra question: 
>>
> why I need to do something like:
>>
>> lambda row: row.tablename.field
>>
>> something like this looks more elegant:
>>
>> lambda this: this.field
>>
>> just saying...
>>
>
> You can do:
>
> lambda this: this.tablename.field
>

I should note that while you can use "this" (or any arbitrary argument 
name), it would be unusual in Python (which by convention uses "self" 
within object methods). I would also argue that "row" is more clear in this 
context than something like "this" or "self", as with the latter two, it is 
not clear whether they refer to the Row object or to the Field object -- 
"row" makes it clear that a Row object is being passed to the function.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to