[Python-checkins] cpython: Change style to match the surrounding code (no early returns).
stefan.krah
python-checkins at python.org
Fri Nov 8 20:38:18 CET 2013
http://hg.python.org/cpython/rev/0591bf2edcf1
changeset: 87011:0591bf2edcf1
parent: 87003:0f48843652b1
user: Stefan Krah <skrah at bytereef.org>
date: Fri Nov 08 17:48:58 2013 +0100
summary:
Change style to match the surrounding code (no early returns).
files:
Modules/_decimal/_decimal.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -3010,12 +3010,11 @@
}
}
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);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list