Skip to content

Commit 107eeb5

Browse files
authored
PEP 791: Mark as Final (#4671)
1 parent 433d904 commit 107eeb5

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

peps/pep-0791.rst

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
PEP: 791
22
Title: math.integer --- submodule for integer-specific mathematics functions
3-
Author: Sergey B Kirpichev <[email protected]>
3+
Author: Neil Girdhar <[email protected]>,
4+
Sergey B Kirpichev <[email protected]>,
5+
Tim Peters <[email protected]>,
6+
Serhiy Storchaka <[email protected]>
47
Sponsor: Victor Stinner <[email protected]>
58
Discussions-To: https://discuss.python.org/t/92548
6-
Status: Draft
9+
Status: Final
710
Type: Standards Track
811
Created: 12-May-2025
912
Python-Version: 3.15
1013
Post-History: `12-Jul-2018 <https://mail.python.org/archives/list/[email protected]/thread/YYJ5YJBJNCVXQWK5K3WSVNMPUSV56LOR/>`__,
1114
`09-May-2025 <https://discuss.python.org/t/91337>`__,
1215
`19-May-2025 <https://discuss.python.org/t/92548>`__,
16+
Resolution: `23-Oct-2025 <https://discuss.python.org/t/92548/154>`__
17+
18+
19+
.. canonical-doc:: `math.integer — integer-specific mathematics functions <https://docs.python.org/3.15/library/math.integer.html>`_
1320

1421

1522
Abstract
@@ -146,8 +153,8 @@ Module functions will accept integers and objects that implement the
146153
object to an integer number. Suitable functions must be computed exactly,
147154
given sufficient time and memory.
148155

149-
The :pypi:`intmath` package will provide new submodule content for older Python
150-
versions.
156+
The :pypi:`intmath` package, available on PyPI, will provide new submodule
157+
content for older Python versions.
151158

152159

153160
Possible Extensions
@@ -169,8 +176,8 @@ compatible interface for the stdlib.
169176
Backwards Compatibility
170177
=======================
171178

172-
As aliases in :external+py3.14:mod:`math` will be kept for an indefinite time
173-
(their use would be discouraged), there are no anticipated code breaks.
179+
As aliases in :external+py3.14:mod:`math` will be kept indefinitely (their use
180+
would be discouraged), there are no anticipated code breaks.
174181

175182

176183
How to Teach This
@@ -201,10 +208,11 @@ isqrt() renaming
201208
---------------------------------------------
202209

203210
There was a brief discussion about exposing :external+py3.14:func:`math.isqrt`
204-
as ``imath.sqrt`` in the same way that :external+py3.14:func:`cmath.sqrt` is
205-
the complex version of :external+py3.14:func:`math.sqrt`. However, ``isqrt``
206-
is ultimately a different function: it is the floor of the square root. It
207-
would be confusing to give it the same name (under a different module).
211+
as ``sqrt`` in the new namespace in the same way that
212+
:external+py3.14:func:`cmath.sqrt` is the complex version of
213+
:external+py3.14:func:`math.sqrt`. However, ``isqrt`` is ultimately a
214+
different function: it is the floor of the square root. It would be confusing
215+
to give it the same name (under a different submodule).
208216

209217

210218
Module name
@@ -218,15 +226,15 @@ Other proposed names include ``ntheory`` (like SymPy's submodule),
218226

219227
But the SC prefers a submodule rather than a new top-level module. Most
220228
popular variants of the :external+py3.14:mod:`math`'s submodule are:
221-
``integer``, ``discrete`` or ``ntheory`` (author preference).
229+
``integer``, ``discrete`` or ``ntheory``.
222230

223231

224232
Acknowledgements
225233
================
226234

227-
Thanks to Tim Peters for reviving the idea of splitting the
228-
:external+py3.14:mod:`math` module. Thanks to Neil Girdhar for substantial
229-
improvements of the initial draft.
235+
Thanks to Victor Stinner for sponsoring this PEP.
236+
Thanks to everyone who participated in the discussions on discuss.python.org,
237+
providing feedback, especially to Oscar Benjamin, Steve Dower and Paul Moore.
230238

231239

232240
Copyright

0 commit comments

Comments
 (0)