diff options
author | Georg Brandl <georg@python.org> | 2009-10-10 22:05:26 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-10-10 22:05:26 (GMT) |
commit | 583350f104a5c65842a0cc60a22dbbfdaba43969 (patch) | |
tree | b9132f4f0c0219177fc37f8c3773ff33142176bd | |
parent | 8bef554cf7716921368ff5422ae437b62cf536a4 (diff) | |
download | cpython-583350f104a5c65842a0cc60a22dbbfdaba43969.zip cpython-583350f104a5c65842a0cc60a22dbbfdaba43969.tar.gz cpython-583350f104a5c65842a0cc60a22dbbfdaba43969.tar.bz2 |
Merged revisions 75327 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75327 | georg.brandl | 2009-10-11 00:03:43 +0200 (So, 11 Okt 2009) | 1 line
Style fixes.
........
-rw-r--r-- | Demo/scripts/find-uname.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Demo/scripts/find-uname.py b/Demo/scripts/find-uname.py index fbf4033..1902423 100644 --- a/Demo/scripts/find-uname.py +++ b/Demo/scripts/find-uname.py @@ -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(chr(ix))) ) + unicode_names.append((ix, unicodedata.name(chr(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:]) |