[Python-checkins] bpo-36908: 'This module is always available' isn't helpful. (#13297)

Kushal Das webhook-mailer at python.org
Fri May 17 05:59:18 EDT 2019


https://github.com/python/cpython/commit/6faad355db6c2bd4a0ade7868f245b42c04f5337
commit: 6faad355db6c2bd4a0ade7868f245b42c04f5337
branch: master
author: Ned Batchelder <ned at nedbatchelder.com>
committer: Kushal Das <mail at kushaldas.in>
date: 2019-05-17T15:29:13+05:30
summary:

bpo-36908: 'This module is always available' isn't helpful. (#13297)

Makes the documentation of math and cmath module
more helpful for the beginners.

files:
M Doc/library/cmath.rst
M Doc/library/math.rst
M Modules/cmathmodule.c
M Modules/mathmodule.c

diff --git a/Doc/library/cmath.rst b/Doc/library/cmath.rst
index 9d81730f2012..28cd96b0e12d 100644
--- a/Doc/library/cmath.rst
+++ b/Doc/library/cmath.rst
@@ -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::
 
diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index 7129525c7887..49f932d03845 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -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
diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c
index 8319767b8a9e..b421f04fa605 100644
--- a/Modules/cmathmodule.c
+++ b/Modules/cmathmodule.c
@@ -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
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index ba8423211c2b..8f6a303cc4de 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -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 = {



More information about the Python-checkins mailing list