Vedran Čačić <ved...@gmail.com> added the comment: is_prime that's always correct is probably not the right thing to go into math. Besides, now we have isqrt, it's just
n>1 and n&1 and all(n%d for d in range(3,isqrt(n)+1,2)) -- yes, it's damn slow, but so is everything else you want to be absolutely correct. :-] is_probable_prime is another matter, but there is an enormous amount of bikeshedding about the API of that one. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39479> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com