From 69d747baec447e6d9cf890a3695fc25345a77cc8 Mon Sep 17 00:00:00 2001 From: gwen Date: Wed, 5 Dec 2012 11:12:04 +0100 Subject: [PATCH] comments on the code --- tiramisu/option.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tiramisu/option.py b/tiramisu/option.py index 0bc2a98..726b848 100644 --- a/tiramisu/option.py +++ b/tiramisu/option.py @@ -51,7 +51,10 @@ class Multi(list): self.config = config self.opt = opt if self.opt.is_master(config): + # we pass the list at the list type's init + # because a normal init cannot return anything super(Multi, self).__init__(lst) + # we add the slaves without modifying the master for l in lst: try: self.append(l, add_master=False) @@ -66,7 +69,10 @@ class Multi(list): def append(self, value, add_master=True): """the list value can be updated (appened) - only if the option is a master""" + only if the option is a master + :param add_master: adds slaves without modifiying the master option + if True, adds slaves **and** the master option + """ try: master = self.config._cfgimpl_descr.get_master_name() if master != self.opt._name: