Robert Bradshaw created BEAM-7840:
-------------------------------------

             Summary: Create MapTuple and FlatMapTuple to ease migration to 
Python 3.
                 Key: BEAM-7840
                 URL: https://issues.apache.org/jira/browse/BEAM-7840
             Project: Beam
          Issue Type: Test
          Components: sdk-py-core
            Reporter: Robert Bradshaw


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))



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to