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

4 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -6,13 +6,12 @@

66
77

--------------

88
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.

1615
1716

.. note::

1817
Original file line numberDiff line numberDiff line change

@@ -10,8 +10,8 @@

1010
1111

--------------

1212
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.

1515
1616

These functions cannot be used with complex numbers; use the functions of the

1717

same name from the :mod:`cmath` module if you require support for complex

Original file line numberDiff line numberDiff line change

@@ -1232,8 +1232,8 @@ cmath_isclose_impl(PyObject *module, Py_complex a, Py_complex b,

12321232

}

12331233
12341234

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.");

12371237
12381238

static PyMethodDef cmath_methods[] = {

12391239

CMATH_ACOS_METHODDEF

Original file line numberDiff line numberDiff line change

@@ -2759,8 +2759,8 @@ static PyMethodDef math_methods[] = {

27592759
27602760
27612761

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.");

27642764
27652765
27662766

static struct PyModuleDef mathmodule = {