Skip to content

Commit 0bdae06

Browse files
Apply suggestions from code review
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 439bda8 commit 0bdae06

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Lib/test/datetimetester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ def test_timestamp(self):
12131213
self.assertEqual(t.timestamp(), 0.0)
12141214

12151215
t = date(2000, 1, 1)
1216-
self.assertEqual(t.timestamp(),946684800.0)
1216+
self.assertEqual(t.timestamp(), 946684800.0)
12171217

12181218
t = date(2025, 3, 14)
12191219
self.assertEqual(t, date.fromtimestamp(t.timestamp()))

Modules/_datetimemodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3869,7 +3869,7 @@ date_weekday(PyObject *self, PyObject *Py_UNUSED(dummy))
38693869
}
38703870

38713871
static PyObject *
3872-
date_timestamp(PyObject *self, PyObject *Py_UNUSED(ignored))
3872+
date_timestamp(PyObject *self, PyObject *Py_UNUSED(dummy))
38733873
{
38743874
PyObject *ordinal_obj = date_toordinal(self, NULL);
38753875
if (!ordinal_obj) {
@@ -3960,7 +3960,7 @@ static PyMethodDef date_methods[] = {
39603960
PyDoc_STR("Return the day of the week represented by the date.\n"
39613961
"Monday == 0 ... Sunday == 6")},
39623962

3963-
{"timestamp", (PyCFunction)date_timestamp, METH_NOARGS,
3963+
{"timestamp", date_timestamp, METH_NOARGS,
39643964
PyDoc_STR("Return POSIX timestamp as float (midnight UTC).")},
39653965

39663966
DATETIME_DATE_REPLACE_METHODDEF

0 commit comments

Comments
 (0)