[web2py] Re: Use of return locals()

2012-03-28 Thread Andrew
Thanks Anthony ! On Thursday, March 29, 2012 2:31:02 PM UTC+13, Anthony wrote: > > locals() returns a dictionary including all the variables in the local > function, so it is exactly equivalent to dict(grid=grid) in this case. See > http://docs.python.org/library/functions.html#locals. In genera

[web2py] Re: Use of return locals()

2012-03-28 Thread Anthony
locals() returns a dictionary including all the variables in the local function, so it is exactly equivalent to dict(grid=grid) in this case. See http://docs.python.org/library/functions.html#locals. In general, though, you should probably explicitly return just the variables you need to pass t