Return the next higher scope.
(self)
| 47 | return _ALL_SCOPES[index - 1] |
| 48 | |
| 49 | def next_higher(self) -> "Scope": |
| 50 | """Return the next higher scope.""" |
| 51 | index = _SCOPE_INDICES[self] |
| 52 | if index == len(_SCOPE_INDICES) - 1: |
| 53 | raise ValueError(f"{self} is the upper-most scope") |
| 54 | return _ALL_SCOPES[index + 1] |
| 55 | |
| 56 | def __lt__(self, other: "Scope") -> bool: |
| 57 | self_index = _SCOPE_INDICES[self] |
no outgoing calls