Minor beautification (turn nested-if into a conjunction).

This commit is contained in:
Raymond Hettinger 2016-08-31 23:00:32 -07:00
parent 5f30f79357
commit 2f9cc7ab0c

View file

@ -119,8 +119,7 @@ class Random(_random.Random):
x ^= len(a) x ^= len(a)
a = -2 if x == -1 else x a = -2 if x == -1 else x
if version == 2: if version == 2 and isinstance(a, (str, bytes, bytearray)):
if isinstance(a, (str, bytes, bytearray)):
if isinstance(a, str): if isinstance(a, str):
a = a.encode() a = a.encode()
a += _sha512(a).digest() a += _sha512(a).digest()