Explorar el Código

Simplify; no need to create a range every loop if all you are testing is if `i` is within bounds.

Martijn Pieters hace 13 años
padre
commit
b934b07a12
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      supervisor/datatypes.py

+ 1 - 1
supervisor/datatypes.py

@@ -78,7 +78,7 @@ def dict_of_key_value_pairs(arg):
 
     D = {}
     i = 0
-    while i in range(0, tokens_len):
+    while i < tokens_len:
         k_eq_v = tokens[i:i+3]
         if len(k_eq_v) != 3:
             raise ValueError, "Unexpected end of key/value pairs"