Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-7840

Create MapTuple and FlatMapTuple to ease migration to Python 3.

    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.15.0
    • Component/s: sdk-py-core
    • Labels:
      None

      Description

      These are like Map and FlatMap but expand out tuple input elements across
      several arguments. This will be useful as tuple argument unpacking has been
      removed in Python 3. Instead of having to convert

      Map(lambda (k, v): expresion(k, v))

      into

      Map(lambda k_v: expression(k_v[0], k_v[1]))

      one can now write

      MapTuple(lambda k, v: expression(k, v))

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                robertwb Robert Bradshaw
                Reporter:
                robertwb Robert Bradshaw
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m