From: Julien Palard Date: Wed, 17 Oct 2018 06:45:51 +0000 (+0200) Subject: Doc: Fix is_prime (GH-9909) X-Git-Tag: v3.8.0a1~760 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e73ad38ab7d218b9ef8976032865928dfad00f1;p=thirdparty%2FPython%2Fcpython.git Doc: Fix is_prime (GH-9909) --- diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index 47ca6b38f84e..3890e49f597b 100644 --- a/Doc/library/concurrent.futures.rst +++ b/Doc/library/concurrent.futures.rst @@ -257,6 +257,10 @@ ProcessPoolExecutor Example 1099726899285419] def is_prime(n): + if n < 2: + return False + if n == 2: + return True if n % 2 == 0: return False