X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=unfold%2Fcomposite.py;h=16e28f30071ada65fa8afe92c606ebf319f3342c;hb=64c9f6a817a402720d18ea7bf6cd80f07ca767ec;hp=ffa6de98e60aee0edeae19005fb132d839ccdc91;hpb=64be7f204b6f00244951821884a37fb74b3bbe36;p=myslice.git diff --git a/unfold/composite.py b/unfold/composite.py index ffa6de98..16e28f30 100644 --- a/unfold/composite.py +++ b/unfold/composite.py @@ -4,13 +4,13 @@ from unfold.plugin import Plugin # sons is expected to be a list of the contained plugins, and # active_domid is the domid for the one son that should be displayed as active # some subclasses of Composite, like e.g. Tabs, will not behave as expected -# if a valid active_domid is not be provided +# if a valid active_domid is not provided class Composite (Plugin): - def __init__ (self, sons=[], active_domid=None, *args, **kwds): + def __init__ (self, sons=None, active_domid=None, *args, **kwds): Plugin.__init__ (self, *args, **kwds) - self.sons=sons + self.sons= sons if sons else [] self.active_domid=active_domid # make sure this is valid, unset otherwise, so we always have exactly one active self.check_active_domid()