MCPcopy Create free account
hub / github.com/nodejs/node / soft

Method soft

deps/v8/third_party/jinja2/compiler.py:232–243  ·  view source on GitHub ↗

Return a soft frame. A soft frame may not be modified as standalone thing as it shares the resources with the frame it was created of, but it's not a rootlevel frame any longer. This is only used to implement if-statements and conditional expressions.

(self)

Source from the content-addressed store, hash-verified

230 return Frame(self.eval_ctx, self)
231
232 def soft(self) -> "Frame":
233 """Return a soft frame. A soft frame may not be modified as
234 standalone thing as it shares the resources with the frame it
235 was created of, but it's not a rootlevel frame any longer.
236
237 This is only used to implement if-statements and conditional
238 expressions.
239 """
240 rv = self.copy()
241 rv.rootlevel = False
242 rv.soft_frame = True
243 return rv
244
245 __copy__ = copy
246

Callers 2

visit_IfMethod · 0.45
visit_CondExprMethod · 0.45

Calls 1

copyMethod · 0.95

Tested by

no test coverage detected