MCPcopy
hub / github.com/pallets/jinja / const

Method const

src/jinja2/nodes.py:890–893  ·  view source on GitHub ↗
(obj: t.Optional[Expr])

Source from the content-addressed store, hash-verified

888 eval_ctx = get_eval_context(self, eval_ctx)
889
890 def const(obj: t.Optional[Expr]) -> t.Optional[t.Any]:
891 if obj is None:
892 return None
893 return obj.as_const(eval_ctx)
894
895 return slice(const(self.start), const(self.stop), const(self.step))
896

Callers 2

Calls 1

as_constMethod · 0.45

Tested by

no test coverage detected