aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/conf.py
diff options
context:
space:
mode:
authorKen Takagiwa <ken@Kens-MacBook-Pro.local>2014-07-15 21:34:05 -0700
committerReynold Xin <rxin@apache.org>2014-07-15 21:34:05 -0700
commit563acf5edfbfb2fa756a1f0accde0940592663e9 (patch)
treee4df0fc75b2c1aa748e80293dd099b5eb6ea375b /python/pyspark/conf.py
parent9c12de5092312319aa22f24df47a6de0e41a0102 (diff)
downloadspark-563acf5edfbfb2fa756a1f0accde0940592663e9.tar.gz
spark-563acf5edfbfb2fa756a1f0accde0940592663e9.tar.bz2
spark-563acf5edfbfb2fa756a1f0accde0940592663e9.zip
follow pep8 None should be compared using is or is not
http://legacy.python.org/dev/peps/pep-0008/ ## Programming Recommendations - Comparisons to singletons like None should always be done with is or is not, never the equality operators. Author: Ken Takagiwa <ken@Kens-MacBook-Pro.local> Closes #1422 from giwa/apache_master and squashes the following commits: 7b361f3 [Ken Takagiwa] follow pep8 None should be checked using is or is not
Diffstat (limited to 'python/pyspark/conf.py')
-rw-r--r--python/pyspark/conf.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/pyspark/conf.py b/python/pyspark/conf.py
index 8eff4a242a..60fc6ba7c5 100644
--- a/python/pyspark/conf.py
+++ b/python/pyspark/conf.py
@@ -30,7 +30,7 @@ u'My app'
u'local'
>>> sc.appName
u'My app'
->>> sc.sparkHome == None
+>>> sc.sparkHome is None
True
>>> conf = SparkConf(loadDefaults=False)
@@ -116,7 +116,7 @@ class SparkConf(object):
def setExecutorEnv(self, key=None, value=None, pairs=None):
"""Set an environment variable to be passed to executors."""
- if (key != None and pairs != None) or (key == None and pairs == None):
+ if (key is not None and pairs is not None) or (key is None and pairs is None):
raise Exception("Either pass one key-value pair or a list of pairs")
elif key != None:
self._jconf.setExecutorEnv(key, value)