From: Raymond Hettinger Date: Wed, 8 Sep 2010 19:27:59 +0000 (+0000) Subject: Improve variable name (don't shadow a builtin). X-Git-Tag: v3.2a3~373 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=63b17671f00aafefc01c9b6d541d48c842e523b7;p=thirdparty%2FPython%2Fcpython.git Improve variable name (don't shadow a builtin). --- diff --git a/Lib/random.py b/Lib/random.py index e4073ddb5a85..83a070cd3258 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -634,9 +634,9 @@ class SystemRandom(Random): raise ValueError('number of bits must be greater than zero') if k != int(k): raise TypeError('number of bits should be an integer') - bytes = (k + 7) // 8 # bits / 8 and rounded up - x = int.from_bytes(_urandom(bytes), 'big') - return x >> (bytes * 8 - k) # trim excess bits + numbytes = (k + 7) // 8 # bits / 8 and rounded up + x = int.from_bytes(_urandom(numbytes), 'big') + return x >> (numbytes * 8 - k) # trim excess bits def seed(self, *args, **kwds): "Stub method. Not used for a system random number generator."