[Python-checkins] r75327 - python/trunk/Demo/scripts/find-uname.py

georg.brandl python-checkins at python.org
Sun Oct 11 00:03:44 CEST 2009


Author: georg.brandl
Date: Sun Oct 11 00:03:43 2009
New Revision: 75327

Log:
Style fixes.

Modified:
   python/trunk/Demo/scripts/find-uname.py

Modified: python/trunk/Demo/scripts/find-uname.py
==============================================================================
--- python/trunk/Demo/scripts/find-uname.py	(original)
+++ python/trunk/Demo/scripts/find-uname.py	Sun Oct 11 00:03:43 2009
@@ -21,20 +21,20 @@
 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:])


More information about the Python-checkins mailing list