]> granicus.if.org Git - python/commitdiff
bpo-36908: 'This module is always available' isn't helpful. (#13297)
authorNed Batchelder <ned@nedbatchelder.com>
Fri, 17 May 2019 09:59:14 +0000 (05:59 -0400)
committerKushal Das <mail@kushaldas.in>
Fri, 17 May 2019 09:59:13 +0000 (15:29 +0530)
Makes the documentation of math and cmath module
more helpful for the beginners.

Doc/library/cmath.rst
Doc/library/math.rst
Modules/cmathmodule.c
Modules/mathmodule.c

index 9d81730f20122265e0dd774f6b40ac1073dfb756..28cd96b0e12da9c71cd78fad1730e9f7cd4f66be 100644 (file)
@@ -6,13 +6,12 @@
 
 --------------
 
-This module is always available.  It provides access to mathematical functions
-for complex numbers.  The functions in this module accept integers,
-floating-point numbers or complex numbers as arguments. They will also accept
-any Python object that has either a :meth:`__complex__` or a :meth:`__float__`
-method: these methods are used to convert the object to a complex or
-floating-point number, respectively, and the function is then applied to the
-result of the conversion.
+This module provides access to mathematical functions for complex numbers.  The
+functions in this module accept integers, floating-point numbers or complex
+numbers as arguments. They will also accept any Python object that has either a
+:meth:`__complex__` or a :meth:`__float__` method: these methods are used to
+convert the object to a complex or floating-point number, respectively, and
+the function is then applied to the result of the conversion.
 
 .. note::
 
index 7129525c788767622219f32702944b90ac9c605e..49f932d03845c867a18df6d625ed0a2c97c290d4 100644 (file)
@@ -10,8 +10,8 @@
 
 --------------
 
-This module is always available.  It provides access to the mathematical
-functions defined by the C standard.
+This module provides access to the mathematical functions defined by the C
+standard.
 
 These functions cannot be used with complex numbers; use the functions of the
 same name from the :mod:`cmath` module if you require support for complex
index 8319767b8a9eef9876d33862460a328694f6ea6f..b421f04fa605c2e6085fc6182b950640aedbaee8 100644 (file)
@@ -1232,8 +1232,8 @@ cmath_isclose_impl(PyObject *module, Py_complex a, Py_complex b,
 }
 
 PyDoc_STRVAR(module_doc,
-"This module is always available. It provides access to mathematical\n"
-"functions for complex numbers.");
+"This module provides access to mathematical functions for complex\n"
+"numbers.");
 
 static PyMethodDef cmath_methods[] = {
     CMATH_ACOS_METHODDEF
index ba8423211c2b53f04e6b65dbf824d89a7faf1f0c..8f6a303cc4deb4a7d8da74ecc080069fbe83fccd 100644 (file)
@@ -2759,8 +2759,8 @@ static PyMethodDef math_methods[] = {
 
 
 PyDoc_STRVAR(module_doc,
-"This module is always available.  It provides access to the\n"
-"mathematical functions defined by the C standard.");
+"This module provides access to the mathematical functions\n"
+"defined by the C standard.");
 
 
 static struct PyModuleDef mathmodule = {