def __init__(self, name, type=None, parent=None, definition=None): self._parent = parent self._name = name self._props = base.SmartList() self._definition = definition super(BaseSection, self).__init__() # this may fire a change event, so have the section setup then self.type = type
def clone(self, children=True): """ clone this object recursively allowing to copy it independently to another document """ obj = super(BaseSection, self).clone(children) obj._props = base.SmartList() if children: for p in self._props: obj.append(p.clone()) return obj
def __init__(self, name, type=None, parent=None, definition=None, reference=None, repository=None, link=None, include=None): self._parent = None self._name = name self._props = base.SmartList() self._definition = definition self._reference = reference self._repository = repository self._link = link self._include = include super(BaseSection, self).__init__() # this may fire a change event, so have the section setup then self.type = type self.parent = parent