弹出当前scope :return: 当前scope名
(self)
| 78 | raise ValueError("Scope not found") |
| 79 | |
| 80 | def pop_scope(self): |
| 81 | """弹出当前scope |
| 82 | |
| 83 | :return: 当前scope名 |
| 84 | """ |
| 85 | task_id = type(self).get_current_task_id() |
| 86 | try: |
| 87 | return self.scope_stack[task_id].pop() |
| 88 | except IndexError: |
| 89 | raise ValueError("ROOT Scope can't pop") from None |
| 90 | |
| 91 | def push_scope(self, name): |
| 92 | """进入新scope""" |
no test coverage detected