aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/cloudpickle.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/cloudpickle.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/cloudpickle.py')
-rw-r--r--python/pyspark/cloudpickle.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/pyspark/cloudpickle.py b/python/pyspark/cloudpickle.py
index eb5dbb8de2..4fda2a9b95 100644
--- a/python/pyspark/cloudpickle.py
+++ b/python/pyspark/cloudpickle.py
@@ -243,10 +243,10 @@ class CloudPickler(pickle.Pickler):
# if func is lambda, def'ed at prompt, is in main, or is nested, then
# we'll pickle the actual function object rather than simply saving a
# reference (as is done in default pickler), via save_function_tuple.
- if islambda(obj) or obj.func_code.co_filename == '<stdin>' or themodule == None:
+ if islambda(obj) or obj.func_code.co_filename == '<stdin>' or themodule is None:
#Force server to import modules that have been imported in main
modList = None
- if themodule == None and not self.savedForceImports:
+ if themodule is None and not self.savedForceImports:
mainmod = sys.modules['__main__']
if useForcedImports and hasattr(mainmod,'___pyc_forcedImports__'):
modList = list(mainmod.___pyc_forcedImports__)