]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Elaborate datetime.timedelta docstring (GH-7458)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 19 Oct 2018 23:08:14 +0000 (16:08 -0700)
committerGitHub <noreply@github.com>
Fri, 19 Oct 2018 23:08:14 +0000 (16:08 -0700)
(cherry picked from commit d6a61f232619f8a8e6efacc3da5a02abaf25f090)

Co-authored-by: Chris Barker <Chris.Barker@noaa.gov>
Modules/_datetimemodule.c

index 64928b1f81c19ec404dcd4cb024ff8678552e7c0..afc865e466de1d7d28abfb18988c6fd7f830cb0b 100644 (file)
@@ -2413,7 +2413,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 */