On Fri, Jul 13, 2018 at 11:48 AM, Steven D'Aprano <st...@pearwood.info> wrote: > On Fri, Jul 13, 2018 at 10:56:21AM +1000, Chris Angelico wrote: > >> You can say that about algorithms easily enough. My point is that this >> ought to be a constraint on the function - implementations may choose >> other algorithms, but they MUST follow one pattern or the other, >> meaning that a Python script can depend on it without knowing the >> implementation. Like guaranteeing that list.sort() is stable without >> stipulating the actual sort algo used. > > I cannot imagine an algorithm that wasn't totally brain-dead (like "flip > a coin") which could wrongly report a prime number as composite. Maybe > I'm not imaginative enough :-)
Haha. Okay. I'm not familiar with every possible primality test, so I had no idea that they ALL have the same failure mode :) ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/