All states of any FileBase.
Example
Example
>>> with States() as s:
>>> print(s.UNUSED)
This class is a solution to mimic an 'Enum' but is compatible with both Python 2.7 and Python 3+.
All states of any FileBase.
>>> with States() as s:
>>> print(s.UNUSED)
This class is a solution to mimic an 'Enum' but is compatible with both Python 2.7 and Python 3+.
Create the dictionary.
def __init__(self):
"""Create the dictionary."""
self.__dict__ = dict(MISSING=-1, UNUSED=0, CHECKED=1, LOCKED=2, AT_LEAST_ONE_CHECKED=3, AT_LEAST_ONE_LOCKED=4)
def __enter__(self):
return self
def __exit__(self, exc_type, exc_value, traceback):
pass