-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
PEP 791: Mark as Final #4671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
PEP 791: Mark as Final #4671
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
88c4891
Mark PEP 791 as Accepted
skirpichev 9113788
Fix imath reference in the isqrt() renaming section
skirpichev 90fcb51
Edit module name section
skirpichev 2a91c08
Reorganize Acknowledgements a bit
skirpichev 5c96434
+1
skirpichev 57e7206
Clarify note on intmath's PyPI package
skirpichev 78af68d
Merge branch 'master' into pep791-final
skirpichev 1a2a625
address review: "for an indefinite time" -> "indefinitely"
skirpichev 081ac74
Accepted -> Final
skirpichev 2b92d59
Merge branch 'master' into pep791-final
skirpichev e0b6767
Add canonical-doc
skirpichev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,19 @@ | ||
| PEP: 791 | ||
| Title: math.integer --- submodule for integer-specific mathematics functions | ||
| Author: Sergey B Kirpichev <[email protected]> | ||
| Author: Neil Girdhar <[email protected]>, | ||
| Sergey B Kirpichev <[email protected]>, | ||
| Tim Peters <[email protected]>, | ||
| Serhiy Storchaka <[email protected]> | ||
| Sponsor: Victor Stinner <[email protected]> | ||
| Discussions-To: https://discuss.python.org/t/92548 | ||
| Status: Draft | ||
| Status: Accepted | ||
| Type: Standards Track | ||
| Created: 12-May-2025 | ||
| Python-Version: 3.15 | ||
| Post-History: `12-Jul-2018 <https://mail.python.org/archives/list/[email protected]/thread/YYJ5YJBJNCVXQWK5K3WSVNMPUSV56LOR/>`__, | ||
| `09-May-2025 <https://discuss.python.org/t/91337>`__, | ||
| `19-May-2025 <https://discuss.python.org/t/92548>`__, | ||
| Resolution: `23-Oct-2025 <https://discuss.python.org/t/92548/154>`__ | ||
|
|
||
|
|
||
| Abstract | ||
|
|
@@ -146,8 +150,8 @@ Module functions will accept integers and objects that implement the | |
| object to an integer number. Suitable functions must be computed exactly, | ||
| given sufficient time and memory. | ||
|
|
||
| The :pypi:`intmath` package will provide new submodule content for older Python | ||
| versions. | ||
| The :pypi:`intmath` package, available on PyPI, will provide new submodule | ||
| content for older Python versions. | ||
|
|
||
|
|
||
| Possible Extensions | ||
|
|
@@ -169,8 +173,8 @@ compatible interface for the stdlib. | |
| Backwards Compatibility | ||
| ======================= | ||
|
|
||
| As aliases in :external+py3.14:mod:`math` will be kept for an indefinite time | ||
| (their use would be discouraged), there are no anticipated code breaks. | ||
| As aliases in :external+py3.14:mod:`math` will be kept indefinitely (their use | ||
| would be discouraged), there are no anticipated code breaks. | ||
|
|
||
|
|
||
| How to Teach This | ||
|
|
@@ -201,10 +205,11 @@ isqrt() renaming | |
| --------------------------------------------- | ||
|
|
||
| There was a brief discussion about exposing :external+py3.14:func:`math.isqrt` | ||
| as ``imath.sqrt`` in the same way that :external+py3.14:func:`cmath.sqrt` is | ||
| the complex version of :external+py3.14:func:`math.sqrt`. However, ``isqrt`` | ||
| is ultimately a different function: it is the floor of the square root. It | ||
| would be confusing to give it the same name (under a different module). | ||
| as ``sqrt`` in the new namespace in the same way that | ||
| :external+py3.14:func:`cmath.sqrt` is the complex version of | ||
| :external+py3.14:func:`math.sqrt`. However, ``isqrt`` is ultimately a | ||
| different function: it is the floor of the square root. It would be confusing | ||
| to give it the same name (under a different submodule). | ||
|
|
||
|
|
||
| Module name | ||
|
|
@@ -218,15 +223,15 @@ Other proposed names include ``ntheory`` (like SymPy's submodule), | |
|
|
||
| But the SC prefers a submodule rather than a new top-level module. Most | ||
| popular variants of the :external+py3.14:mod:`math`'s submodule are: | ||
| ``integer``, ``discrete`` or ``ntheory`` (author preference). | ||
| ``integer``, ``discrete`` or ``ntheory``. | ||
|
|
||
|
|
||
| Acknowledgements | ||
| ================ | ||
|
|
||
| Thanks to Tim Peters for reviving the idea of splitting the | ||
| :external+py3.14:mod:`math` module. Thanks to Neil Girdhar for substantial | ||
| improvements of the initial draft. | ||
| Thanks to Victor Stinner for sponsoring this PEP. | ||
| Thanks to everyone who participated in the discussions on discuss.python.org, | ||
| providing feedback, especially to Oscar Benjamin, Steve Dower and Paul Moore. | ||
|
|
||
|
|
||
| Copyright | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.