获取当前任务的scope栈检索scope名 :param int idx: scope栈的索引 :return: scope名,不存在时返回 None
(self, idx)
| 66 | self._closed = False |
| 67 | |
| 68 | def get_scope_name(self, idx): |
| 69 | """获取当前任务的scope栈检索scope名 |
| 70 | |
| 71 | :param int idx: scope栈的索引 |
| 72 | :return: scope名,不存在时返回 None |
| 73 | """ |
| 74 | task_id = type(self).get_current_task_id() |
| 75 | try: |
| 76 | return self.scope_stack[task_id][idx] |
| 77 | except IndexError: |
| 78 | raise ValueError("Scope not found") |
| 79 | |
| 80 | def pop_scope(self): |
| 81 | """弹出当前scope |
no test coverage detected