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

    https://github.com/apache/spark/pull/21383#discussion_r190448642
  
    --- Diff: python/pyspark/rdd.py ---
    @@ -791,9 +792,11 @@ def foreach(self, f):
             >>> def f(x): print(x)
             >>> sc.parallelize([1, 2, 3, 4, 5]).foreach(f)
             """
    +        safe_f = fail_on_StopIteration(f)
    --- End diff --
    
    `safe` prefix doesn't imply why it's safe though .. I would just name it 
like `fail_on_stopiteration_f` or feel free to another name if you have a good 
one.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to