Return the next lower scope.
(self)
| 40 | Session = "session" |
| 41 | |
| 42 | def next_lower(self) -> Scope: |
| 43 | """Return the next lower scope.""" |
| 44 | index = _SCOPE_INDICES[self] |
| 45 | if index == 0: |
| 46 | raise ValueError(f"{self} is the lower-most scope") |
| 47 | return _ALL_SCOPES[index - 1] |
| 48 | |
| 49 | def next_higher(self) -> Scope: |
| 50 | """Return the next higher scope.""" |
no outgoing calls