summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorJulien Palard <julien@palard.fr>2018-10-17 06:45:51 (GMT)
committerGitHub <noreply@github.com>2018-10-17 06:45:51 (GMT)
commit8e73ad38ab7d218b9ef8976032865928dfad00f1 (patch)
tree646f0b9c955c284ac37a2d6cbf65c93487d09f4b /Doc/library
parentc984d20ec81609aa439ccdb3af5bc35fca0c2112 (diff)
downloadcpython-8e73ad38ab7d218b9ef8976032865928dfad00f1.zip
cpython-8e73ad38ab7d218b9ef8976032865928dfad00f1.tar.gz
cpython-8e73ad38ab7d218b9ef8976032865928dfad00f1.tar.bz2
Doc: Fix is_prime (GH-9909)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/concurrent.futures.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst
index 47ca6b3..3890e49 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