summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
diff options
context:
space:
mode:
authorTim Hoffmann <2836374+timhoffm@users.noreply.github.com>2018-09-24 08:39:02 (GMT)
committerPetr Viktorin <encukou@gmail.com>2018-09-24 08:39:02 (GMT)
commita0fd7f1b55a1d76842fa2c6b5777a39cdcf2bb5e (patch)
treeea55a55e2e4be74e3a9ab1d9d281e7bca2a172dd /Modules/clinic
parent9718b59ee5f2416cdb8116ea5837b062faf0d9f8 (diff)
downloadcpython-a0fd7f1b55a1d76842fa2c6b5777a39cdcf2bb5e.zip
cpython-a0fd7f1b55a1d76842fa2c6b5777a39cdcf2bb5e.tar.gz
cpython-a0fd7f1b55a1d76842fa2c6b5777a39cdcf2bb5e.tar.bz2
Migrate datetime.date.fromtimestamp to Argument Clinic (GH-8535)
Diffstat (limited to 'Modules/clinic')
-rw-r--r--Modules/clinic/_datetimemodule.c.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/Modules/clinic/_datetimemodule.c.h b/Modules/clinic/_datetimemodule.c.h
index 4d92049..0f917dd 100644
--- a/Modules/clinic/_datetimemodule.c.h
+++ b/Modules/clinic/_datetimemodule.c.h
@@ -2,6 +2,18 @@
preserve
[clinic start generated code]*/
+PyDoc_STRVAR(datetime_date_fromtimestamp__doc__,
+"fromtimestamp($type, timestamp, /)\n"
+"--\n"
+"\n"
+"Create a date from a POSIX timestamp.\n"
+"\n"
+"The timestamp is a number, e.g. created via time.time(), that is interpreted\n"
+"as local time.");
+
+#define DATETIME_DATE_FROMTIMESTAMP_METHODDEF \
+ {"fromtimestamp", (PyCFunction)datetime_date_fromtimestamp, METH_O|METH_CLASS, datetime_date_fromtimestamp__doc__},
+
PyDoc_STRVAR(datetime_datetime_now__doc__,
"now($type, /, tz=None)\n"
"--\n"
@@ -36,4 +48,4 @@ datetime_datetime_now(PyTypeObject *type, PyObject *const *args, Py_ssize_t narg
exit:
return return_value;
}
-/*[clinic end generated code: output=1fc05897ab239b3f input=a9049054013a1b77]*/
+/*[clinic end generated code: output=7fd14bd67749da23 input=a9049054013a1b77]*/