You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Eric O. LEBIGOT (EOL) (JIRA)" <ji...@apache.org> on 2014/12/29 12:58:13 UTC
[jira] [Comment Edited] (SPARK-4992) Prominent Python example has
bad, beginner style
[ https://issues.apache.org/jira/browse/SPARK-4992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14260069#comment-14260069 ]
Eric O. LEBIGOT (EOL) edited comment on SPARK-4992 at 12/29/14 11:57 AM:
-------------------------------------------------------------------------
Thank you for your response!
It does not fail, it just shadows an existing built-in. It is considered bad style, because it changes the expected meaning of file (this is official, IIRC).
textFile is not good as per PEP 8. :)
I suggest either "text_file", or, shorter, "lines".
It'd be great if you can submit a patch—I'm only used to GitHub.
was (Author: lebigot):
Thank you for your response!
It does not fail, it just shadows an existing built-in. It is considered bad style, because it changes the expected meaning of file (this is official, IIRC).
textFile is not good as per PEP 8. :)
I suggest either "text_file", or, shorter, "lines".
> Prominent Python example has bad, beginner style
> ------------------------------------------------
>
> Key: SPARK-4992
> URL: https://issues.apache.org/jira/browse/SPARK-4992
> Project: Spark
> Issue Type: Improvement
> Components: Documentation
> Reporter: Eric O. LEBIGOT (EOL)
> Priority: Trivial
> Labels: documentation
> Attachments: SPARK-4992.patch
>
> Original Estimate: 5m
> Remaining Estimate: 5m
>
> In the main webpage http://spark.apache.org/, the Python example uses a variable named "file": this is a well-known bad practice (because file is the name of a built-in class).
> Such a prominently visible example should show a better mastery of Python, if Spark is to give confidence in the quality of its Python API.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org