Skip to content

Commit 70b4724

Browse files
committed
Style fixes from code review
1 parent 96b047b commit 70b4724

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/pyspark/rdd.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,8 @@ def aggregate(self, zeroValue, seqOp, combOp):
580580
the type of this RDD. Thus, we need one operation for merging a T into an U
581581
and one operation for merging two U
582582
583-
>>> seqOp = (lambda x, y: (x[0]+y, x[1] + 1))
584-
>>> combOp = (lambda x, y: (x[0]+y[0], x[1] + y[1]))
583+
>>> seqOp = (lambda x, y: (x[0] + y, x[1] + 1))
584+
>>> combOp = (lambda x, y: (x[0] + y[0], x[1] + y[1]))
585585
>>> sc.parallelize([1, 2, 3, 4]).aggregate((0, 0), seqOp, combOp)
586586
(10, 4)
587587
"""
@@ -592,6 +592,7 @@ def func(iterator):
592592
if acc is not None:
593593
yield acc
594594
return self.mapPartitions(func).reduce(combOp)
595+
595596
def sum(self):
596597
"""
597598
Add up the elements in this RDD.

0 commit comments

Comments
 (0)