From ef7f29f66c8c8c51405f61cea8a7803987deee50 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Fri, 19 Oct 2018 16:02:13 -0700 Subject: [PATCH] Elaborate datetime.timedelta docstring (GH-7458) (cherry picked from commit d6a61f232619f8a8e6efacc3da5a02abaf25f090) Co-authored-by: Chris Barker --- Modules/_datetimemodule.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 41b95b919394..81a0b1f16811 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -2640,7 +2640,11 @@ static PyMethodDef delta_methods[] = { }; static const char delta_doc[] = -PyDoc_STR("Difference between two datetime values."); +PyDoc_STR("Difference between two datetime values.\n\n" + "timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, " + "minutes=0, hours=0, weeks=0)\n\n" + "All arguments are optional and default to 0.\n" + "Arguments may be integers or floats, and may be positive or negative."); static PyNumberMethods delta_as_number = { delta_add, /* nb_add */ -- 2.47.3