[pypy-commit] pypy py3.5: Replace checks for None and space.w_None with space.is_none
remarkablerocket
pypy.commits at gmail.com
Tue Sep 20 06:23:08 EDT 2016
Author: Daniel Patrick <danieljudepatrick at gmail.com>
Branch: py3.5
Changeset: r87242:3c6fe0885f72
Date: 2016-09-19 17:20 +0100
http://bitbucket.org/pypy/pypy/changeset/3c6fe0885f72/
Log: Replace checks for None and space.w_None with space.is_none
diff --git a/pypy/module/__builtin__/operation.py b/pypy/module/__builtin__/operation.py
--- a/pypy/module/__builtin__/operation.py
+++ b/pypy/module/__builtin__/operation.py
@@ -106,7 +106,7 @@
if round is None:
raise oefmt(space.w_TypeError,
"type %T doesn't define __round__ method", w_number)
- if w_ndigits is None or w_ndigits is space.w_None:
+ if space.is_none(w_ndigits):
return space.get_and_call_function(round, w_number)
else:
return space.get_and_call_function(round, w_number, w_ndigits)
More information about the pypy-commit
mailing list