Github user robertzk commented on a diff in the pull request:
https://github.com/apache/spark/pull/4840#discussion_r25966182
--- Diff: docs/programming-guide.md ---
@@ -1353,7 +1353,7 @@ data.map(x -> accum.add(x); f(x););
<div data-lang="python" markdown="1">
{% highlight python %}
accum = sc.accumulator(0)
-data.map(lambda x => acc.add(x); f(x))
+data.map(lambda x: acc.add(x) and f(x))
--- End diff --
I like the separate function; there really is no good way to write
multi-line lambdas in Python.
---
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]