<return-scope> return values from the current scope

name
return-scope
xml namespace
http://moyaproject.com

Return values from the current scope.

This tag is useful in macros, widgets, and other callable tags where you want to return a number of values in a dictionary.

For example, the following will return a dictionary containing two keys:

<return-scope values="foo, bar"/>

This is equivalent to the following:

<return value="{'foo': foo, 'bar': bar}"/>

If you *don't* specify the values attribute, Moya will read the values from the enclosed text (one key per line). The following code is equivalent to the above:

<return-scope>
    foo
    bar
</return-scope>
attributes
name purpose type required? default choices
default Default for missing values expression No None
values Values to return comma list No
inherited attributes
name purpose type required? default choices
if Conditional expression expression No yes