A bool wrapper that can be shared between multiple objects
Source code in dp3/common/state.py
| def __init__(self, flag: bool = False, banner: str = ""):
self._flag = flag
self._banner = banner
|
set
Set the flag to flag
. True by default.
Source code in dp3/common/state.py
| def set(self, flag: bool = True):
"""Set the flag to `flag`. True by default."""
self._flag = flag
|
unset
Unset the flag.
Source code in dp3/common/state.py
| def unset(self):
"""Unset the flag."""
self._flag = False
|
isset
Check if the flag is set.
Source code in dp3/common/state.py
| def isset(self):
"""Check if the flag is set."""
return self._flag
|