aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-12-25 12:48:02 +0100
committerMattias Andrée <maandree@operamail.com>2013-12-25 12:48:02 +0100
commite2b7b6a477eeb04bf869dfcf75a29b9184723ec5 (patch)
treeaaeb4772ed4d0137be5d5c7d39448a7c0767f13d /src
parentupdate pkgbuild (diff)
downloadargparser-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')
-rw-r--r--src/argparser.py4
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)))