Currently tackling pset6 similarities more, and I'm trying to figure out what the purpose of enumeration is for in the Operation
class.
Here is the code taken from the helpers.py
file:
class Operation(Enum):
"""Operations"""
DELETED = 1
INSERTED = 2
SUBSTITUTED = 3
def __str__(self):
return str(self.name.lower())
I understand that we are instructed to use one of Operation.DELETED
, Operation.INSERTED
or Operation.SUBSTITUTED
for the operation value of the tuple. But what is the purpose creating an Operation class for it and enumerating it?