bpo-36908: 'This module is always available' isn't helpful. (#13297) · python/cpython@6faad35 (original) (raw)

4 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -6,13 +6,12 @@
6 6
7 7 --------------
8 8
9 -This module is always available. It provides access to mathematical functions
10 -for complex numbers. The functions in this module accept integers,
11 -floating-point numbers or complex numbers as arguments. They will also accept
12 -any Python object that has either a :meth:`__complex__` or a :meth:`__float__`
13 -method: these methods are used to convert the object to a complex or
14 -floating-point number, respectively, and the function is then applied to the
15 -result of the conversion.
9 +This module provides access to mathematical functions for complex numbers. The
10 +functions in this module accept integers, floating-point numbers or complex
11 +numbers as arguments. They will also accept any Python object that has either a
12 +:meth:`__complex__` or a :meth:`__float__` method: these methods are used to
13 +convert the object to a complex or floating-point number, respectively, and
14 +the function is then applied to the result of the conversion.
16 15
17 16 .. note::
18 17
Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@
10 10
11 11 --------------
12 12
13 -This module is always available. It provides access to the mathematical
14 -functions defined by the C standard.
13 +This module provides access to the mathematical functions defined by the C
14 +standard.
15 15
16 16 These functions cannot be used with complex numbers; use the functions of the
17 17 same name from the :mod:`cmath` module if you require support for complex
Original file line number Diff line number Diff line change
@@ -1232,8 +1232,8 @@ cmath_isclose_impl(PyObject *module, Py_complex a, Py_complex b,
1232 1232 }
1233 1233
1234 1234 PyDoc_STRVAR(module_doc,
1235 -"This module is always available. It provides access to mathematical\n"
1236 -"functions for complex numbers.");
1235 +"This module provides access to mathematical functions for complex\n"
1236 +"numbers.");
1237 1237
1238 1238 static PyMethodDef cmath_methods[] = {
1239 1239 CMATH_ACOS_METHODDEF
Original file line number Diff line number Diff line change
@@ -2759,8 +2759,8 @@ static PyMethodDef math_methods[] = {
2759 2759
2760 2760
2761 2761 PyDoc_STRVAR(module_doc,
2762 -"This module is always available. It provides access to the\n"
2763 -"mathematical functions defined by the C standard.");
2762 +"This module provides access to the mathematical functions\n"
2763 +"defined by the C standard.");
2764 2764
2765 2765
2766 2766 static struct PyModuleDef mathmodule = {