This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients mark.dickinson, rhettinger, serhiy.storchaka, stutzbach, tim.peters
Date 2019-06-02.11:25:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1559474716.18.0.768878584457.issue37132@roundup.psfhosted.org>
In-reply-to
Content
> What's the plan for the existing functions `math.gcd` and `math.factorial`?

I think they should eventually get deprecated, but with long term of deprecation. Deprecation warning should be added only when imath versions are already available in older Python versions.

But they can be also kept as pure aliases for very long time.

> Does PEP 399 apply here?

There were no Python implementations when these functions was in the math module. But there are Python implementations for all these functions (used in tests or as predecessors), so it is not hard to add them in the stdlib. Easier that to implement math.sin() on Python from scratch.

> Should `imath.isqrt` be renamed to `imath.sqrt`?

I considered this idea and do not have answer.

> What's the actual benefit of this separation?

Currently math becomes a mix of very different functions. Separation will help to keep it simpler (from user and implementation sides). It also adds a place for landing new integer specific functions which are too specific to add them into the math module or into the int class.
History
Date User Action Args
2019-06-02 11:25:16serhiy.storchakasetrecipients: + serhiy.storchaka, tim.peters, rhettinger, mark.dickinson, stutzbach
2019-06-02 11:25:16serhiy.storchakasetmessageid: <1559474716.18.0.768878584457.issue37132@roundup.psfhosted.org>
2019-06-02 11:25:16serhiy.storchakalinkissue37132 messages
2019-06-02 11:25:15serhiy.storchakacreate