]> granicus.if.org Git - python/commitdiff
Style fixes.
authorGeorg Brandl <georg@python.org>
Sat, 10 Oct 2009 22:03:43 +0000 (22:03 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 10 Oct 2009 22:03:43 +0000 (22:03 +0000)
Demo/scripts/find-uname.py

index b76b9f0fe80fadcd005c78eb0217144bfd62e122..958f8a4fb42451c24677e1db9d09c976b318c18c 100644 (file)
@@ -21,20 +21,20 @@ import sys
 import re
 
 def main(args):
-    unicode_names= []
+    unicode_names = []
     for ix in range(sys.maxunicode+1):
         try:
-            unicode_names.append( (ix, unicodedata.name(unichr(ix))) )
+            unicode_names.append((ix, unicodedata.name(unichr(ix))))
         except ValueError: # no name for the character
             pass
     for arg in args:
         pat = re.compile(arg, re.I)
-        matches = [(x,y) for (x,y) in unicode_names
-                       if pat.search(y) is not None]
+        matches = [(y,x) for (x,y) in unicode_names
+                   if pat.search(y) is not None]
         if matches:
             print "***", arg, "matches", "***"
-            for (x,y) in matches:
-                print "%s (%d)" % (y,x)
+            for match in matches:
+                print "%s (%d)" % match
 
 if __name__ == "__main__":
     main(sys.argv[1:])