(self, eval_ctx=None)
| 438 | abstract = True |
| 439 | |
| 440 | def as_const(self, eval_ctx=None): |
| 441 | eval_ctx = get_eval_context(self, eval_ctx) |
| 442 | # intercepted operators cannot be folded at compile time |
| 443 | if self.environment.sandboxed and \ |
| 444 | self.operator in self.environment.intercepted_unops: |
| 445 | raise Impossible() |
| 446 | f = _uaop_to_func[self.operator] |
| 447 | try: |
| 448 | return f(self.node.as_const(eval_ctx)) |
| 449 | except Exception: |
| 450 | raise Impossible() |
| 451 | |
| 452 | |
| 453 | class Name(Expr): |
nothing calls this directly
no test coverage detected