2018-07-13 11:13 GMT+02:00 Jeroen Demeyer <j.deme...@ugent.be>:
> On 2018-07-13 10:43, Jacco van Dorp wrote:
>>
>> If there's going to be failure possible primality tests, there should
>> also exist certain ones. No matter how slow it can be to do it.
>
>
> A certain primality test would be too specialized for the Python stdlib. If
> you really need that (which you typically don't), there are existing number
> theory packages.

You forgot to include my reasons for this:

>> Python if often a language for beginners. I think it'd be confusing to
>> a lot of people that there's going to be tests that show "This one is
>> probably prime", instead of sure tests.

Depending on function names, of course. It needn't be the fastest
available, but its what people would expect, especially those with
less experience. Also, there's existing number theory packages for
everything suggested here, so that's not an argument.

At the very least, use is_likely_prime() as function name. Otherwise,
the name of the function is just plain wrong. Don't claim accuracy you
don't have.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to