[ 
https://issues.apache.org/jira/browse/SPARK-23522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apache Spark reassigned SPARK-23522:
------------------------------------

    Assignee: Apache Spark

> pyspark should always use sys.exit rather than exit
> ---------------------------------------------------
>
>                 Key: SPARK-23522
>                 URL: https://issues.apache.org/jira/browse/SPARK-23522
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 2.2.1
>            Reporter: Benjamin Peterson
>            Assignee: Apache Spark
>            Priority: Major
>
> pyspark uses the builtin exit() function a lot. In certain Python 
> environments exit is not is not defined as a builtin. E.g.,
> {code:shell}
> $ python -c "exit(4)"
> $ python -S -c "exit(4)"
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
> NameError: name 'exit' is not defined
> {code}
> exit() as a builtin is really only intended for interactive use. Real code 
> should always use sys.exit.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to