MCPcopy
hub / github.com/python/mypy / evaluate_expression

Function evaluate_expression

mypy/evalexpr.py:205–211  ·  view source on GitHub ↗

Evaluate an expression at runtime. Return the result of the expression, or UNKNOWN if the expression cannot be evaluated.

(expr: mypy.nodes.Expression)

Source from the content-addressed store, hash-verified

203
204
205def evaluate_expression(expr: mypy.nodes.Expression) -> object:
206 """Evaluate an expression at runtime.
207
208 Return the result of the expression, or UNKNOWN if the expression cannot be
209 evaluated.
210 """
211 return expr.accept(_evaluator)

Callers 1

Calls 1

acceptMethod · 0.45

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…