Open tcamise-gpsw opened 2 years ago
Maybe take a look at https://github.com/danielgtaylor/python-betterproto/pull/203
I just found https://github.com/danielgtaylor/python-betterproto/pull/293. which sounds quite similar Maybe this is the same?
Maybe take a look at #203
Thanks, that does look promising. I'll test it out and see if I can revive it.
Perhaps I don't understand the intended use of the
to_dict
method but, at least for my use case, I would prefer it to return the actual enum instead of it's name as a string.For example:
gives
RESULT_SUCCESS: <class 'str'>
instead of the actualEnumResultGeneric
.It is a simple change to get this desired behavior in the
to_dict
method:Is this desirable for other people? Maybe allow this as a parameter to
to_dict
?