Are you saying you want to do something like:

def function_vars(...):
    stylesheet = some_stylesheet
    navbarpad = some_navbarpad
    logo = some_logo
    return locals()

def some_action():
    return function_vars()

Yes, you can do that. Have you tried it and had a problem? Note, if 
function_vars is defined in a controller, either make sure it takes at 
least one argument or name it __function_vars -- otherwise, it will be 
accessible via URL.

Anthony
    

On Monday, May 25, 2015 at 11:31:19 AM UTC-4, Annet wrote:
>
> Hi Anthony,
>
> Can you provide a more detailed example of what you are trying to achieve?
>>
>
> I have afunction which returns the following dictionary:
>
> return dict(stylesheet=stylesheet, navbarpad=navbarpad, logo=logo, 
> wordmark=wordmark, brandurl=brandurl,
>                 dropdowns=dropdowns, plural=plural, 
> maincomponent=maincomponent, downloadvcard=downloadvcard,
>                 vertex=vertex, address=address, googlemaps=googlemaps, 
> qrcode=qrcode, socialmedia=socialmedia)
>
>
> I just thought that when these variables are stored in sort of a function 
> object I could do:
>
> return functions_vars()
>
>
> instead of returning them explicitly in a dict()
>
>
> Best,
>
> Annet
>

-- 
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