We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 056cf08 commit e00aa62Copy full SHA for e00aa62
1 file changed
Modules/_datetimemodule.c
@@ -3301,9 +3301,6 @@ datetime_date_today_impl(PyTypeObject *type)
3301
type);
3302
}
3303
3304
- /* Note well: since today() is a class method, it may not call
3305
- * date.fromtimestamp, e.g., it may call datetime.fromtimestamp.
3306
- */
3307
PyTime_t ts;
3308
if (PyTime_Time(&ts) < 0) {
3309
return NULL;
@@ -3312,6 +3309,9 @@ datetime_date_today_impl(PyTypeObject *type)
3312
if (time == NULL) {
3313
3310
3314
3311
+ /* Note well: since today() is a class method, it may not call
+ * date.fromtimestamp, e.g., it may call datetime.fromtimestamp.
+ */
3315
PyObject *result = PyObject_CallMethodOneArg((PyObject*)type, &_Py_ID(fromtimestamp), time);
3316
Py_DECREF(time);
3317
return result;
0 commit comments