summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Hoffmann <l-m-h@web.de>2017-08-05 08:49:13 +0200
committerLucas Hoffmann <l-m-h@web.de>2017-08-20 02:32:04 +0200
commitcecaeed5af047dacec24ba74fd0b9006d2b9e5e0 (patch)
treed7449b464f78815b9a56e1c32d93cc399b54a074
parent34ffe73c11ed8e33e5be5f127958465c943b264d (diff)
py3k: Fix function signature
With python3 sublists are not allowed in function definitions any longer. But the same can be done with call time iterable expansion. References: https://docs.python.org/2/reference/compound_stmts.html#grammar-token-sublist https://docs.python.org/3/reference/compound_stmts.html#function-definitions
-rw-r--r--alot/completion.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/completion.py b/alot/completion.py
index 88eee312..3d214ca5 100644
--- a/alot/completion.py
+++ b/alot/completion.py
@@ -437,10 +437,10 @@ class CommandCompleter(Completer):
localpos)
# prepend 'set ' + header and correct position
- def f((completed, pos)):
+ def f(completed, pos):
return ('%s %s' % (header, completed),
pos + len(header) + 1)
- res = [f(r) for r in res]
+ res = [f(c, p) for c, p in res]
logging.debug(res)
elif self.mode == 'envelope' and cmd == 'unset':