Message344279
> 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. |
|
Date |
User |
Action |
Args |
2019-06-02 11:25:16 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, tim.peters, rhettinger, mark.dickinson, stutzbach |
2019-06-02 11:25:16 | serhiy.storchaka | set | messageid: <1559474716.18.0.768878584457.issue37132@roundup.psfhosted.org> |
2019-06-02 11:25:16 | serhiy.storchaka | link | issue37132 messages |
2019-06-02 11:25:15 | serhiy.storchaka | create | |
|