Author vstinner
Recipients Ananthakrishnan, lemburg, mark.dickinson, rhettinger, serhiy.storchaka, steven.daprano, stutzbach, tim.peters, veky, vstinner
Date 2020-01-31.10:44:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1580467459.21.0.141270808836.issue39479@roundup.psfhosted.org>
In-reply-to
Content
I dislike the idea of adding a is_prime() function in Python since users will likely stress Python with huge numbers and then complain that Python is too slow. Correct is_prime() is very slow for large numbers, and statistically approach is not 100% correct... Or we may have to add both approaches. But then you have to pick an algorithm which would fit "most use cases".

I concur with Tim, it would be better to put such opinionated code on PyPI ;-)

--

I'm -0 on adding math.lcm(). For example, I failed to find any request to add such function on python-ideas archives. This issue seems to be the first user request.

I'm not opposed to add it. Some people seem to like the idea of the completeness of the stdlib (gcd & lcm go together). So if someone wants to add it, go ahead and propose a PR :-)
History
Date User Action Args
2020-01-31 10:44:19vstinnersetrecipients: + vstinner, lemburg, tim.peters, rhettinger, mark.dickinson, stutzbach, steven.daprano, serhiy.storchaka, veky, Ananthakrishnan
2020-01-31 10:44:19vstinnersetmessageid: <1580467459.21.0.141270808836.issue39479@roundup.psfhosted.org>
2020-01-31 10:44:19vstinnerlinkissue39479 messages
2020-01-31 10:44:18vstinnercreate