summaryrefslogtreecommitdiffstats
path: root/Modules/_datetimemodule.c
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2013-11-23 23:37:55 (GMT)
committerLarry Hastings <larry@hastings.org>2013-11-23 23:37:55 (GMT)
commit44e2eaab5491881120aab43e2838da8afe7ab70e (patch)
tree92847876fa89736ab40d027431ff27e4973409c9 /Modules/_datetimemodule.c
parent7fa6e1aeea111e7d954b753fb483afc18f21add0 (diff)
downloadcpython-44e2eaab5491881120aab43e2838da8afe7ab70e.zip
cpython-44e2eaab5491881120aab43e2838da8afe7ab70e.tar.gz
cpython-44e2eaab5491881120aab43e2838da8afe7ab70e.tar.bz2
Issue #19674: inspect.signature() now produces a correct signature
for some builtins.
Diffstat (limited to 'Modules/_datetimemodule.c')
-rw-r--r--Modules/_datetimemodule.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index 13c4ecc..e4dc1bf 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -16,6 +16,12 @@
#include "datetime.h"
#undef Py_BUILD_CORE
+/*[clinic]
+module datetime
+class datetime.datetime
+[clinic]*/
+/*[clinic checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+
/* We require that C int be at least 32 bits, and use int virtually
* everywhere. In just a few cases we use a temp long, where a Python
* API returns a C long. In such cases, we have to ensure that the
@@ -4140,8 +4146,6 @@ datetime_best_possible(PyObject *cls, TM_FUNC f, PyObject *tzinfo)
}
/*[clinic]
-module datetime
-class datetime.datetime
@classmethod
datetime.datetime.now
@@ -4155,9 +4159,9 @@ If no tz is specified, uses local timezone.
[clinic]*/
PyDoc_STRVAR(datetime_datetime_now__doc__,
+"now(tz=None)\n"
"Returns new datetime object representing current time local to tz.\n"
"\n"
-"datetime.datetime.now(tz=None)\n"
" tz\n"
" Timezone object.\n"
"\n"
@@ -4188,7 +4192,7 @@ exit:
static PyObject *
datetime_datetime_now_impl(PyTypeObject *cls, PyObject *tz)
-/*[clinic checksum: 5e61647d5d1feaf1ab096c5406ccea17bb7b061c]*/
+/*[clinic checksum: ca3d26a423b3f633b260c7622e303f0915a96f7c]*/
{
PyObject *self;