aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile4
-rw-r--r--src/argparser.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 0317125..b23115c 100644
--- a/Makefile
+++ b/Makefile
@@ -60,8 +60,8 @@ bin/argparser.bash: src/argparser.bash
java: bin/ArgParser.jar
bin/ArgParser.jar: src/argparser/ArgParser.java
@mkdir -p bin
- $(JAVAC) $(JAVA_OPTIMISE) -cp src -s src -d bin src/argparser/ArgParser.java
- $(JAVAC) $(JAVA_OPTIMISE) -cp src -s src -d bin src/Test.java
+ $(JAVAC) $(JAVA_OPTIMISE) -encoding UTF-8 -cp src -s src -d bin src/argparser/ArgParser.java
+ $(JAVAC) $(JAVA_OPTIMISE) -encoding UTF-8 -cp src -s src -d bin src/Test.java
cd bin ; jar cf ArgParser.jar argparser/ArgParser*.class
.PHONY: c
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)))