[
https://issues.apache.org/jira/browse/THRIFT-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734450#action_12734450
]
David Reiss commented on THRIFT-546:
------------------------------------
I think I'm okay with all of the proposed ideas, so why don't you (Todd) pick
one and let me know. I think that "_ENUM_NAMES" and "_ENUM_VALUES" are safer
names than TO_STRING and FROM_STRING, though.
> Python generated code should give the ability to convert to/from string names
> of enums
> --------------------------------------------------------------------------------------
>
> Key: THRIFT-546
> URL: https://issues.apache.org/jira/browse/THRIFT-546
> Project: Thrift
> Issue Type: New Feature
> Components: Compiler (Python)
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Attachments: thrift-546.txt
>
>
> The current code just generates enums as int constants namespaced within a
> class. This patch adds dictionaries in that class called TO_STRING and
> FROM_STRING, so enum values can be nicely printed in log messages, etc.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.