]> granicus.if.org Git - python/commitdiff
Properly parenthesize a long Boolean combination. Formerly, you could
authorGuido van Rossum <guido@python.org>
Thu, 2 Jan 1997 18:13:35 +0000 (18:13 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 2 Jan 1997 18:13:35 +0000 (18:13 +0000)
pass invalid seed values.

Lib/whrandom.py

index 3cc15323b558622bb1bee68340605d599735d104..8250234dcb635b274c59d31ac7faed60889c75e9 100644 (file)
@@ -44,7 +44,7 @@ class whrandom:
        def seed(self, x = 0, y = 0, z = 0):
                if not type(x) == type(y) == type(z) == type(0):
                        raise TypeError, 'seeds must be integers'
-               if not 0 <= x < 256 and 0 <= y < 256 and 0 <= z < 256:
+               if not (0 <= x < 256 and 0 <= y < 256 and 0 <= z < 256):
                        raise ValueError, 'seeds must be in range(0, 256)'
                if 0 == x == y == z:
                        # Initialize from current time