dict(key1=val1, key2=val2, ...)
is actually a python construct not a web2py one, and it can be used
when the keys are simple strings. Moreover this construct is already a
shortcut for the more verbose
dict('key1':val1, ...)You could however do something like this: def asdict(L): return dict( (x,globals()[x]) for x in L.split()) vars='key1 key2 key2 ...' return asdict(vars) On Dec 17, 10:28 am, JorgeRpo <[email protected]> wrote: > Hello > > Is it possible to use > > return dict(var) > > instead of > > return dict(var=var) > > Because, the default syntax makes you to repeat a word. > > What about to use > > return dict(form=loginform) > > In other words, specify only when you are going yo change the name of > the var?? > -- > sig text -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

