-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
a: protocolRelated to underlying networking protocolRelated to underlying networking protocolt: enhancementImprovement to an existing featureImprovement to an existing feature
Description
There is a couple of methods with duplicated logic. Maybe we should do it in one method with dict or possibly with an enum class?
from enum import Enum
class ValueType(Enum):
FULL_NAME = "Q"
...
def write_value_with_type(self, value: int, type: ValueType) -> None:
self.write(self._pack(type.value, value))
write_value_with_type(123, ValueType.FULL_NAME)https://docs.python.org/3/library/enum.html
Originally posted by @PerchunPak in #273 (comment)
Metadata
Metadata
Assignees
Labels
a: protocolRelated to underlying networking protocolRelated to underlying networking protocolt: enhancementImprovement to an existing featureImprovement to an existing feature