Merged revisions 75952-75953,75955,76105,76143,76223,76259,76326,76376-76377 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75952 | georg.brandl | 2009-10-29 21:38:32 +0100 (Do, 29 Okt 2009) | 1 line
Use the correct function name in docstring.
........
r75953 | georg.brandl | 2009-10-29 21:39:50 +0100 (Do, 29 Okt 2009) | 1 line
Remove mention of the old -X command line switch.
........
r75955 | georg.brandl | 2009-10-29 21:54:03 +0100 (Do, 29 Okt 2009) | 1 line
Use a single style for all the docstrings in the math module.
........
r76105 | georg.brandl | 2009-11-04 08:38:12 +0100 (Mi, 04 Nov 2009) | 1 line
#7259: show correct equivalent for operator.i* operations in docstring; fix minor issues in operator docs.
........
r76143 | georg.brandl | 2009-11-07 09:26:07 +0100 (Sa, 07 Nov 2009) | 1 line
#7271: fix typo.
........
r76223 | georg.brandl | 2009-11-12 09:29:46 +0100 (Do, 12 Nov 2009) | 1 line
Give the profile module a module directive.
........
r76259 | georg.brandl | 2009-11-14 12:50:51 +0100 (Sa, 14 Nov 2009) | 1 line
Fix terminology.
........
r76326 | georg.brandl | 2009-11-16 17:44:05 +0100 (Mo, 16 Nov 2009) | 1 line
#7302: fix link.
........
r76376 | georg.brandl | 2009-11-18 20:39:14 +0100 (Mi, 18 Nov 2009) | 1 line
upcase Python
........
r76377 | georg.brandl | 2009-11-18 21:05:15 +0100 (Mi, 18 Nov 2009) | 1 line
Fix markup.
........
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 952d56a..20d66e0 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -338,7 +338,7 @@
"ceil(x)\n\nReturn the ceiling of x as a float.\n"
"This is the smallest integral value >= x.")
FUNC2(copysign, copysign,
- "copysign(x,y)\n\nReturn x with the sign of y.")
+ "copysign(x, y)\n\nReturn x with the sign of y.")
FUNC1(cos, cos, 0,
"cos(x)\n\nReturn the cosine of x (measured in radians).")
FUNC1(cosh, cosh, 1,
@@ -351,8 +351,8 @@
"floor(x)\n\nReturn the floor of x as a float.\n"
"This is the largest integral value <= x.")
FUNC1(log1p, log1p, 1,
- "log1p(x)\n\nReturn the natural logarithm of 1+x (base e).\n\
- The result is computed in a way which is accurate for x near zero.")
+ "log1p(x)\n\nReturn the natural logarithm of 1+x (base e).\n"
+ "The result is computed in a way which is accurate for x near zero.")
FUNC1(sin, sin, 0,
"sin(x)\n\nReturn the sine of x (measured in radians).")
FUNC1(sinh, sinh, 1,
@@ -581,7 +581,7 @@
#undef NUM_PARTIALS
PyDoc_STRVAR(math_fsum_doc,
-"sum(iterable)\n\n\
+"fsum(iterable)\n\n\
Return an accurate floating point sum of values in the iterable.\n\
Assumes IEEE-754 floating point arithmetic.");
@@ -739,7 +739,8 @@
}
PyDoc_STRVAR(math_ldexp_doc,
-"ldexp(x, i) -> x * (2**i)");
+"ldexp(x, i)\n\n\
+Return x * (2**i).");
static PyObject *
math_modf(PyObject *self, PyObject *arg)
@@ -830,7 +831,8 @@
}
PyDoc_STRVAR(math_log_doc,
-"log(x[, base]) -> the logarithm of x to the given base.\n\
+"log(x[, base])\n\n\
+Return the logarithm of x to the given base.\n\
If the base not specified, returns the natural logarithm (base e) of x.");
static PyObject *
@@ -840,7 +842,7 @@
}
PyDoc_STRVAR(math_log10_doc,
-"log10(x) -> the base 10 logarithm of x.");
+"log10(x)\n\nReturn the base 10 logarithm of x.");
static PyObject *
math_fmod(PyObject *self, PyObject *args)
@@ -873,7 +875,7 @@
}
PyDoc_STRVAR(math_fmod_doc,
-"fmod(x,y)\n\nReturn fmod(x, y), according to platform C."
+"fmod(x, y)\n\nReturn fmod(x, y), according to platform C."
" x % y may differ.");
static PyObject *
@@ -915,7 +917,7 @@
}
PyDoc_STRVAR(math_hypot_doc,
-"hypot(x,y)\n\nReturn the Euclidean distance, sqrt(x*x + y*y).");
+"hypot(x, y)\n\nReturn the Euclidean distance, sqrt(x*x + y*y).");
/* pow can't use math_2, but needs its own wrapper: the problem is
that an infinite result can arise either as a result of overflow
@@ -1002,7 +1004,7 @@
}
PyDoc_STRVAR(math_pow_doc,
-"pow(x,y)\n\nReturn x**y (x to the power of y).");
+"pow(x, y)\n\nReturn x**y (x to the power of y).");
static const double degToRad = Py_MATH_PI / 180.0;
static const double radToDeg = 180.0 / Py_MATH_PI;
@@ -1017,7 +1019,8 @@
}
PyDoc_STRVAR(math_degrees_doc,
-"degrees(x) -> converts angle x from radians to degrees");
+"degrees(x)\n\n\
+Convert angle x from radians to degrees.");
static PyObject *
math_radians(PyObject *self, PyObject *arg)
@@ -1029,7 +1032,8 @@
}
PyDoc_STRVAR(math_radians_doc,
-"radians(x) -> converts angle x from degrees to radians");
+"radians(x)\n\n\
+Convert angle x from degrees to radians.");
static PyObject *
math_isnan(PyObject *self, PyObject *arg)
@@ -1041,8 +1045,8 @@
}
PyDoc_STRVAR(math_isnan_doc,
-"isnan(x) -> bool\n\
-Checks if float x is not a number (NaN)");
+"isnan(x) -> bool\n\n\
+Check if float x is not a number (NaN).");
static PyObject *
math_isinf(PyObject *self, PyObject *arg)
@@ -1054,8 +1058,8 @@
}
PyDoc_STRVAR(math_isinf_doc,
-"isinf(x) -> bool\n\
-Checks if float x is infinite (positive or negative)");
+"isinf(x) -> bool\n\n\
+Check if float x is infinite (positive or negative).");
static PyMethodDef math_methods[] = {
{"acos", math_acos, METH_O, math_acos_doc},