Skip to content

Commit

Permalink
correct the lines wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrapCodes committed Mar 7, 2014
1 parent d0c71f3 commit 1fea813
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/pyspark/rdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,10 @@ def intersection(self, other):
>>> rdd1.intersection(rdd2).collect()
[1, 2, 3]
"""
return self.map(lambda v: (v, None)).cogroup(
other.map(lambda v: (v, None))).filter(
lambda x: (len(x[1][0]) != 0) and (len(x[1][1]) != 0)).keys()
return self.map(lambda v: (v, None)) \
.cogroup(other.map(lambda v: (v, None))) \
.filter(lambda x: (len(x[1][0]) != 0) and (len(x[1][1]) != 0)) \
.keys()

def _reserialize(self):
if self._jrdd_deserializer == self.ctx.serializer:
Expand Down

0 comments on commit 1fea813

Please sign in to comment.