def __init__(self, data, selected=None, attr=None, indent=None):
     """
     Represents an 'option' html element. If selected is True this
     Elem will be selected when nested in a 'select' Elem.
     """
     self.selected = selected
     Elem.__init__(self, data, attr=attr, indent=indent)
Exemplo n.º 2
0
 def __init__(self, data, attr=None, indent=None):
     """
     Represents an 'a' html element. An href attribute is required.
     """
     Elem.__init__(self, data, attr=attr, indent=indent)
     self.reqiure_attr('href')