[orca] Use enumerate() rather than range() in _setCapsLockAsOrcaModifier()



commit fb9f34f5e38dee6c92df5b5b1388912ac16c12d3
Author: Mario Lang <mlang delysid org>
Date:   Sat Jun 4 16:59:51 2016 -0400

    Use enumerate() rather than range() in _setCapsLockAsOrcaModifier()

 src/orca/orca.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 6b87810..58c0527 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -261,8 +261,7 @@ def _setCapsLockAsOrcaModifier(enable):
     capsModLine =    '        action= SetMods(modifiers=Lock,clearLocks);'
     lines = _originalXmodmap.decode('UTF-8').split('\n')
     foundCapsInterpretSection = False
-    for i in range(len(lines)):
-        line = lines[i]
+    for i, line in enumerate(lines):
         if not foundCapsInterpretSection:
             if interpretCapsLineProg.match(line):
                 foundCapsInterpretSection = True


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]