jinja2.nodes.InternalName.as_const

InternalName.as_const(eval_ctx=None)

Return the value of the expression as constant or raise Impossible if this was not possible.

An EvalContext can be provided, if none is given a default context is created which requires the nodes to have an attached environment.

Changed in version 2.4: the eval_ctx parameter was added.