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)
| 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 |
no test coverage detected