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

Repetitive Python code is generated around serializaion/deserialization

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.10.0
    • None
    • Python - Library
    • None

    Description

      When I look at the generated Python code, I see lines like the following repeated all over the place:

      iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
      

      Can't this be abstracted via a helper function and may be the version can be cached given that it is not going to change?

      Attachments

        Activity

          People

            Unassigned Unassigned
            bgedik Buğra Gedik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: