Skip to content

Commit 8e73ad3

Browse files
authored
Doc: Fix is_prime (GH-9909)
1 parent c984d20 commit 8e73ad3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Doc/library/concurrent.futures.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ ProcessPoolExecutor Example
257257
1099726899285419]
258258

259259
def is_prime(n):
260+
if n < 2:
261+
return False
262+
if n == 2:
263+
return True
260264
if n % 2 == 0:
261265
return False
262266

0 commit comments

Comments
 (0)