[Python-checkins] bpo-46917: math.nan is now always available (GH-31793)
vstinner
webhook-mailer at python.org
Thu Mar 10 11:47:27 EST 2022
https://github.com/python/cpython/commit/7854012077009b9f364f198a8ae38b546ec58313
commit: 7854012077009b9f364f198a8ae38b546ec58313
branch: main
author: Victor Stinner <vstinner at python.org>
committer: vstinner <vstinner at python.org>
date: 2022-03-10T17:47:18+01:00
summary:
bpo-46917: math.nan is now always available (GH-31793)
files:
A Misc/NEWS.d/next/Library/2022-03-10-14-47-16.bpo-46917.s19zcy.rst
M Doc/library/math.rst
M Doc/whatsnew/3.11.rst
diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index 1ad60459e8d37..bcbcdef51d3fc 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -649,6 +649,9 @@ Constants
A floating-point "not a number" (NaN) value. Equivalent to the output of
``float('nan')``.
+ .. versionchanged:: 3.11
+ It is now always available.
+
.. versionadded:: 3.5
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 0e3ccb62cbf39..ce15fb72f3c49 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -254,6 +254,7 @@ inspect
math
----
+
* Add :func:`math.exp2`: return 2 raised to the power of x.
(Contributed by Gideon Mitchell in :issue:`45917`.)
@@ -266,6 +267,9 @@ math
``inf``. Previously they raised :exc:`ValueError`. (Contributed by Mark
Dickinson in :issue:`44339`.)
+* The :data:`math.nan` value is now always available.
+ (Contributed by Victor Stinner in :issue:`46917`.)
+
operator
--------
diff --git a/Misc/NEWS.d/next/Library/2022-03-10-14-47-16.bpo-46917.s19zcy.rst b/Misc/NEWS.d/next/Library/2022-03-10-14-47-16.bpo-46917.s19zcy.rst
new file mode 100644
index 0000000000000..3fbd84a428816
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-03-10-14-47-16.bpo-46917.s19zcy.rst
@@ -0,0 +1 @@
+The :data:`math.nan` value is now always available. Patch by Victor Stinner.
More information about the Python-checkins
mailing list