diff options
author | Stefan Krah <skrah@bytereef.org> | 2013-11-08 16:48:58 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2013-11-08 16:48:58 (GMT) |
commit | 5ec6be9b50da84e126c3a6816b61baabe247724c (patch) | |
tree | 131eb893ee2555bd64bb6ae34c23a0de94ff030f /Modules | |
parent | 70e11acdbd3a206003dd47bbccc111ce1d55b88c (diff) | |
download | cpython-5ec6be9b50da84e126c3a6816b61baabe247724c.zip cpython-5ec6be9b50da84e126c3a6816b61baabe247724c.tar.gz cpython-5ec6be9b50da84e126c3a6816b61baabe247724c.tar.bz2 |
Change style to match the surrounding code (no early returns).
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_decimal/_decimal.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index 6f9e9de..aec3949 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -3010,12 +3010,11 @@ convert_op_cmp(PyObject **vcmp, PyObject **wcmp, PyObject *v, PyObject *w, } } else { - int is_instance = PyObject_IsInstance(w, Rational); - if (is_instance < 0) { + int is_rational = PyObject_IsInstance(w, Rational); + if (is_rational < 0) { *wcmp = NULL; - return 0; } - if (is_instance) { + else if (is_rational > 0) { *wcmp = numerator_as_decimal(w, context); if (*wcmp && !mpd_isspecial(MPD(v))) { *vcmp = multiply_by_denominator(v, w, context); |