-
Notifications
You must be signed in to change notification settings - Fork 231
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Say I've compiled:
class Priority(betterproto.Enum):
PRIORITY_LOW = 0
PRIORITY_MEDIUM = 1
PRIORITY_HIGH = 2
Accessing the string value of each instance (which is defined by .toString()
) is done similarly to Enum
class in python, via Priority.PRIORITY_LOW.name
, for example.
From usability point of view, I'd like to access this by the pythonic convention of str(Priority.PRIORITY_LOW)
. (i.e. add __str__
method to the compiled class).
Appreciate your consideration.
ShayNehmad-RecoLabs
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request