Commit 3dcb0499 authored by louiz’'s avatar louiz’
Browse files

Don't use a list (that we modify) as a default argument

parent 96a9fb69
......@@ -68,7 +68,7 @@ class CommandArgParser(object):
return wrap
def quoted(mandatory, optional=0, defaults=[],
def quoted(mandatory, optional=0, defaults=None,
"""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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment