Experiment.append()#
- Experiment.append(*members, to_section: str = '_content')[source]#
Append members to the experiment.
- Parameters
*members – The members to append
to_section – The parent section for the members to append. All members in a function call will be appended to the same section.
Members can be classes that inherit from
Section
orPage
, as well as instances of these classes or their subclasses. To append Page or Section classes to the experiment, you should use themember()
decorator.While it is perfectly possible to use the
append()
method, usually it is preferable to use to augmented assigment operator+=
to append members to the experiment.Note
All members must have a unique name.
Examples
>>> exp = al.Experiment() >>> exp.append(Page(name="page1")) >>> exp.members {"page1": Page(class="Page", name="page1")}