Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-546

Python generated code should give the ability to convert to/from string names of enums

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.2
    • Python - Compiler
    • None

    Description

      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.

      Attachments

        1. thrift-546.txt
          2 kB
          Todd Lipcon
        2. thrift-546.txt
          2 kB
          Todd Lipcon

        Activity

          People

            tlipcon Todd Lipcon
            tlipcon Todd Lipcon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: