Mailing List Archive

random module: Convert a "while 1" to "while True (GH-21700)
https://github.com/python/cpython/commit/6a613f90bf13038255bca028feeab6fad816edfd
commit: 6a613f90bf13038255bca028feeab6fad816edfd
branch: master
author: Raymond Hettinger <rhettinger@users.noreply.github.com>
committer: GitHub <noreply@github.com>
date: 2020-08-02T12:03:32-07:00
summary:

random module: Convert a "while 1" to "while True (GH-21700)

files:
M Lib/random.py

diff --git a/Lib/random.py b/Lib/random.py
index 37f71110403ad..3ea369b81b3e5 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -682,7 +682,7 @@ def gammavariate(self, alpha, beta):
bbb = alpha - LOG4
ccc = alpha + ainv

- while 1:
+ while True:
u1 = random()
if not 1e-7 < u1 < 0.9999999:
continue

_______________________________________________
Python-checkins mailing list
Python-checkins@python.org
https://mail.python.org/mailman/listinfo/python-checkins