diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2017-08-05 08:49:13 +0200 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2017-08-20 02:32:04 +0200 |
commit | cecaeed5af047dacec24ba74fd0b9006d2b9e5e0 (patch) | |
tree | d7449b464f78815b9a56e1c32d93cc399b54a074 | |
parent | 34ffe73c11ed8e33e5be5f127958465c943b264d (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.py | 4 |
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': |