Deprecated. Use self.state instead. Marks exit from the current local scope. Args: keep: Optional enumerable of variable names to copy into the parent scope. Returns: A dict containing the scope that has just been exited.
(self, keep=None)
| 264 | self._local_scope_state.append(scope_entered) |
| 265 | |
| 266 | def exit_local_scope(self, keep=None): |
| 267 | """Deprecated. |
| 268 | |
| 269 | Use self.state instead. |
| 270 | |
| 271 | Marks exit from the current local scope. |
| 272 | |
| 273 | Args: |
| 274 | keep: Optional enumerable of variable names to copy into the parent scope. |
| 275 | |
| 276 | Returns: |
| 277 | A dict containing the scope that has just been exited. |
| 278 | """ |
| 279 | scope_left = self._local_scope_state.pop() |
| 280 | if keep: |
| 281 | this_scope = self._local_scope_state[-1] |
| 282 | for name in keep: |
| 283 | if name in scope_left: |
| 284 | this_scope[name] = scope_left[name] |
| 285 | return scope_left |
| 286 | |
| 287 | def set_local(self, name, value): |
| 288 | """Deprecated. Use self.state instead.""" |