Commit 56f57f8
[SPARK-12760][DOCS] invalid lambda expression in python example for …
…local vs cluster
srowen thanks for the PR at #10866! sorry it took me a while.
This is related to #10866, basically the assignment in the lambda expression in the python example is actually invalid
```
In [1]: data = [1, 2, 3, 4, 5]
In [2]: counter = 0
In [3]: rdd = sc.parallelize(data)
In [4]: rdd.foreach(lambda x: counter += x)
File "<ipython-input-4-fcb86c182bad>", line 1
rdd.foreach(lambda x: counter += x)
^
SyntaxError: invalid syntax
```
Author: Mortada Mehyar <[email protected]>
Closes #10867 from mortada/doc_python_fix.1 parent 358a33b commit 56f57f8
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
789 | 789 | | |
790 | 790 | | |
791 | 791 | | |
792 | | - | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
793 | 796 | | |
794 | | - | |
| 797 | + | |
795 | 798 | | |
796 | 799 | | |
797 | 800 | | |
| |||
0 commit comments