]> granicus.if.org Git - python/commitdiff
Elaborate datetime.timedelta docstring (GH-7458)
authorChris Barker <Chris.Barker@noaa.gov>
Fri, 19 Oct 2018 22:43:24 +0000 (15:43 -0700)
committerVictor Stinner <vstinner@redhat.com>
Fri, 19 Oct 2018 22:43:24 +0000 (00:43 +0200)
Modules/_datetimemodule.c

index b7c59f1bd8626d5853cb09055372d55ee2474a7e..cdfa235f0917e64e00e0c316e95ffc943468628c 100644 (file)
@@ -2641,7 +2641,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 */