2 <:set:>

<:set name value:>

Allows you to assign the object in value to the local variable named in name. Use this tag to do all of your assignments to variables.

You can also use the <:call:> (see section 2.3, page ) tag to make assignments, by putting a regular Python assignment statement in backticks: <:call `foo = 567`:>. STML still lets you do that. Use the <:set:> tag to assign objects to simple variable names. Use the <:call:> for assignments that are more complex; see its reference page for details.

These two tags assign the integer 567 to the variable name myVar, and then assign a new object returned by calling module.function to the same variable named myVar.

<:set myVar `567`:>
<:set myVar `module.function()`:>