(self, eval_ctx=None)
| 419 | abstract = True |
| 420 | |
| 421 | def as_const(self, eval_ctx=None): |
| 422 | eval_ctx = get_eval_context(self, eval_ctx) |
| 423 | # intercepted operators cannot be folded at compile time |
| 424 | if self.environment.sandboxed and \ |
| 425 | self.operator in self.environment.intercepted_binops: |
| 426 | raise Impossible() |
| 427 | f = _binop_to_func[self.operator] |
| 428 | try: |
| 429 | return f(self.left.as_const(eval_ctx), self.right.as_const(eval_ctx)) |
| 430 | except Exception: |
| 431 | raise Impossible() |
| 432 | |
| 433 | |
| 434 | class UnaryExpr(Expr): |
nothing calls this directly
no test coverage detected