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

Create MapTuple and FlatMapTuple to ease migration to Python 3.

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Resolved
    • Priority: P2
    • 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

          Activity

            People

            • Assignee:
              robertwb Robert Bradshaw
              Reporter:
              robertwb Robert Bradshaw

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Issue deployment