mirror of
https://github.com/python/cpython.git
synced 2025-08-09 11:29:45 +00:00
Change style to match the surrounding code (no early returns).
This commit is contained in:
parent
70e11acdbd
commit
5ec6be9b50
1 changed files with 3 additions and 4 deletions
|
@ -3010,12 +3010,11 @@ convert_op_cmp(PyObject **vcmp, PyObject **wcmp, PyObject *v, PyObject *w,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int is_instance = PyObject_IsInstance(w, Rational);
|
int is_rational = PyObject_IsInstance(w, Rational);
|
||||||
if (is_instance < 0) {
|
if (is_rational < 0) {
|
||||||
*wcmp = NULL;
|
*wcmp = NULL;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
if (is_instance) {
|
else if (is_rational > 0) {
|
||||||
*wcmp = numerator_as_decimal(w, context);
|
*wcmp = numerator_as_decimal(w, context);
|
||||||
if (*wcmp && !mpd_isspecial(MPD(v))) {
|
if (*wcmp && !mpd_isspecial(MPD(v))) {
|
||||||
*vcmp = multiply_by_denominator(v, w, context);
|
*vcmp = multiply_by_denominator(v, w, context);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue