Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5173#discussion_r27261848
  
    --- Diff: python/pyspark/streaming/dstream.py ---
    @@ -579,9 +580,9 @@ def reduceFunc(t, a, b):
                     g = b.groupByKey(numPartitions).mapValues(lambda vs: 
(list(vs), None))
                 else:
                     g = a.cogroup(b.partitionBy(numPartitions), numPartitions)
    -                g = g.mapValues(lambda (va, vb): (list(vb), list(va)[0] if 
len(va) else None))
    --- End diff --
    
    This [Python 3 change](https://www.python.org/dev/peps/pep-3113/) is 
annoying, but I understand the rationale, especially after witnessing users 
getting `lambda x, y` and `lambda (x, y)` confused.  If we use the Python 2.x 
tuple unpacking syntax in our examples, then I guess we should be prepared for 
some users to get confused when our Python 2.x examples in the programming 
guide lead to syntax errors in Python 3.  We can deal with these issues as they 
arise, though.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to