Skip to content

Commit 47413fe

Browse files
Elaborate datetime.timedelta docstring (GH-7458)
(cherry picked from commit d6a61f2) Co-authored-by: Chris Barker <[email protected]>
1 parent a9274f7 commit 47413fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Modules/_datetimemodule.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2413,7 +2413,11 @@ static PyMethodDef delta_methods[] = {
24132413
};
24142414

24152415
static const char delta_doc[] =
2416-
PyDoc_STR("Difference between two datetime values.");
2416+
PyDoc_STR("Difference between two datetime values.\n\n"
2417+
"timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, "
2418+
"minutes=0, hours=0, weeks=0)\n\n"
2419+
"All arguments are optional and default to 0.\n"
2420+
"Arguments may be integers or floats, and may be positive or negative.");
24172421

24182422
static PyNumberMethods delta_as_number = {
24192423
delta_add, /* nb_add */

0 commit comments

Comments
 (0)