From 8e73ad38ab7d218b9ef8976032865928dfad00f1 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Wed, 17 Oct 2018 08:45:51 +0200 Subject: [PATCH] Doc: Fix is_prime (GH-9909) --- Doc/library/concurrent.futures.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index 47ca6b38f8..3890e49f59 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 -- 2.40.0