diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-12-25 12:48:02 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-12-25 12:48:02 +0100 |
commit | e2b7b6a477eeb04bf869dfcf75a29b9184723ec5 (patch) | |
tree | aaeb4772ed4d0137be5d5c7d39448a7c0767f13d /src/argparser.py | |
parent | update pkgbuild (diff) | |
download | argparser-e2b7b6a477eeb04bf869dfcf75a29b9184723ec5.tar.gz argparser-e2b7b6a477eeb04bf869dfcf75a29b9184723ec5.tar.bz2 argparser-e2b7b6a477eeb04bf869dfcf75a29b9184723ec5.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/argparser.py')
-rw-r--r-- | src/argparser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/argparser.py b/src/argparser.py index 8f94c2e..9baa507 100644 --- a/src/argparser.py +++ b/src/argparser.py @@ -73,7 +73,7 @@ class ArgParser(): self.optmap = {} self.__out = sys.stderr.buffer if usestderr else sys.stdout.buffer self.abbreviations = abbreviations if abbreviations is not None else lambda arg, candidates : None - self.__abbreviations = lambda arg : self.abbreviations(arg, self.optmap.keys()) + self.__abbreviations = lambda arg : self.abbreviations(arg, list(self.optmap.keys())) @staticmethod @@ -81,7 +81,7 @@ class ArgParser(): ''' Gets the standard abbrevation expender - @return (str, itr<str>)→str? The standard abbrevation expender + @return (str, list<str>)→str? The standard abbrevation expender ''' one = lambda arg : arg[0] if len(arg) == 1 else None return lambda arg, candidates : one(list(filter(lambda a : a.startswith(arg), candidates))) |