Commits

Anonymous committed 4ebe265

invalid syntax fixed

Comments (0)

Files changed (1)

src/unihistext.py

     from optparse import OptionParser
     parser = OptionParser()
     parser.add_option("-i", "--input", dest="input", help="read Unicode stream from FILE ('-' means stdin, this is the default)", metavar="FILE", default="-")
-    parser.add_option("--encoding", help="set input stream binary encoding ('utf-8' is the default)", default='utf-8')
+    parser.add_option("-f", "--encoding", help="set input stream binary encoding ('utf-8' is the default)", default='utf-8')
     parser.add_option("-l", "--list-encodings", help="list some available encodings and exit", default=False, action="store_true")
     parser.add_option("-V", "--version", help="print version and exit", default=False, action="store_true")
     parser.add_option("-c", "--combining", help="recognize combining character sequences", default=False, action="store_true")
         d['hexs'] = " ".join([ "0x%.6X" % ord(unichr) for unichr in d['unistr'] ]) # convert unistr to HEXes
     @staticmethod
     def stat(stats, totals):
-        totals['max_hexs_len'] = safe_max(len(d['hexs']) for d in stats, 0)
+        totals['max_hexs_len'] = safe_max(len(d['hexs']) for d in stats)
 
 class UnistrFmt(Formatter):
     @staticmethod
             d['name'] = "<no base> " + d['name']
     @staticmethod
     def stat(stats, totals):
-        totals['max_name_len'] = safe_max(len(d['name']) for d in stats, 0)
+        totals['max_name_len'] = safe_max(len(d['name']) for d in stats)
     @staticmethod
     def fmt(d, totals):
         return "%-*s" % (totals['max_name_len'] + 3, d['name'])
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.