Skip to content

Commit b276aac

Browse files
Polishing.
1 parent b832246 commit b276aac

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Modules/_datetimemodule.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3355,8 +3355,7 @@ datetime_date_fromordinal_impl(PyTypeObject *type, int ordinal)
33553355
int day;
33563356

33573357
if (ordinal < 1) {
3358-
PyErr_SetString(PyExc_ValueError, "ordinal must be "
3359-
">= 1");
3358+
PyErr_SetString(PyExc_ValueError, "ordinal must be >= 1");
33603359
return NULL;
33613360
}
33623361
ord_to_ymd(ordinal, &year, &month, &day);
@@ -6547,8 +6546,7 @@ datetime_richcompare(PyObject *self, PyObject *other, int op)
65476546
PyDateTime_Delta *delta;
65486547

65496548
assert(offset1 != offset2); /* else last "if" handled it */
6550-
delta = (PyDateTime_Delta *)datetime_subtract((PyObject *)self,
6551-
other);
6549+
delta = (PyDateTime_Delta *)datetime_subtract(self, other);
65526550
if (delta == NULL)
65536551
goto done;
65546552
diff = GET_TD_DAYS(delta);

0 commit comments

Comments
 (0)