From 3dcb04992dd6eb3f76f9d449ae7118da2c572d08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Wed, 6 Jul 2016 10:08:23 +0200 Subject: Don't use a list (that we modify) as a default argument --- poezio/decorators.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/poezio/decorators.py b/poezio/decorators.py index 344fe9ac..4891d5a5 100644 --- a/poezio/decorators.py +++ b/poezio/decorators.py @@ -68,7 +68,7 @@ class CommandArgParser(object): return wrap @staticmethod - def quoted(mandatory, optional=0, defaults=[], + def quoted(mandatory, optional=0, defaults=None, ignore_trailing_arguments=False): """The function receives a list with a number of arguments that is between @@ -113,6 +113,8 @@ class CommandArgParser(object): ['un et demi', 'deux', 'trois quatre cinq six'] """ + if defaults is None: + defaults = [] def first(func): def second(self, args, *a, **kw): default_args = defaults -- cgit v1.2.3