8.2.7.1.2. _Table¶
- class _Table(rawsource='', *children, **attributes)[source]¶
Methods
__add____bool__Node instances are always true, even if they're empty.
__contains____delattr__Implement delattr(self, name).
__delitem____dir__Default dir() implementation.
__eq__Return self==value.
__format__Default object formatter.
__ge__Return self>=value.
__getattribute__Return getattr(self, name).
__getitem____getstate__Helper for pickle.
__gt__Return self>value.
__hash__Return hash(self).
__iadd__Append a node or a list of nodes to self.children.
__init_subclass__This method is called when a class is subclassed.
__le__Return self<=value.
__len____lt__Return self<value.
__ne__Return self!=value.
__new____radd____reduce__Helper for pickle.
__reduce_ex__Helper for pickle.
__repr__Return repr(self).
__setattr__Implement setattr(self, name, value).
__setitem____sizeof__Size of object in memory, in bytes.
__str__Return str(self).
__subclasshook__Abstract classes can override this to customize issubclass().
_dom_node_fast_findallReturn iterator that only supports instance checks.
_superfast_findallReturn iterator that doesn't check for a condition.
appendappend_attr_listFor each element in values, if it does not exist in self[attr], append it.
asdomReturn a DOM fragment representation of this Node.
astextReturn a string representation of this Node.
attlistclearcoerce_append_attr_listFirst, convert both self[attr] and value to a non-string sequence type; if either is not already a sequence, convert it to a list of one element.
copyMonkey-patch
`nodes.Element.copy`to not copy the_documentattribute.copy_attr_coerceIf attr is an attribute of self and either self[attr] or value is a list, convert all non-sequence values to a sequence of 1 element and then concatenate the two sequence, setting the result to self[attr].
copy_attr_concatenateIf attr is an attribute of self and both self[attr] and value are lists, concatenate the two sequences, setting the result to self[attr].
copy_attr_consistentIf replace is True or self[attr] is None, replace self[attr] with value.
copy_attr_convertIf attr is an attribute of self, set self[attr] to [self[attr], value], otherwise set self[attr] to value.
deepcopyMonkey-patch
`nodes.Element.deepcopy`for speed.delattremptytagendtagextendfindallReturn an iterator yielding nodes following self:
first_child_matching_classReturn the index of the first child whose class exactly matches.
first_child_not_matching_classReturn the index of the first child whose class does not match.
getget_language_codeReturn node's language tag.
has_keyhasattrindexinsertis_not_defaultis_not_known_attributeReturns True if and only if the given attribute is NOT recognized by this class.
is_not_list_attributeReturns True if and only if the given attribute is NOT one of the basic list attributes defined for all Elements.
next_nodeReturn the first node in the iterator returned by findall(), or None if the iterable is empty.
non_default_attributesnote_referenced_byNote that this Element has been referenced by its name name or id id.
pformatReturn an indented pseudo-XML representation, for test purposes.
popprevious_siblingReturn preceding sibling node or
None.removereplaceReplace one child Node with another child or children.
replace_attrIf self[attr] does not exist or force is True or omitted, set self[attr] to value, otherwise do nothing.
replace_selfReplace self node with new, where new is a node or a list of nodes.
set_classAdd a new class to the "classes" attribute.
setdefaultsetup_childshortreprstarttagtraverseReturn list of nodes following self.
update_all_attsUpdates all attributes from node or dictionary dict_.
update_all_atts_coercionUpdates all attributes from node or dictionary dict_.
update_all_atts_concatenatingUpdates all attributes from node or dictionary dict_.
update_all_atts_consistantlyUpdates all attributes from node or dictionary dict_.
update_all_atts_convertUpdates all attributes from node or dictionary dict_.
update_basic_attsUpdate basic attributes ('ids', 'names', 'classes', 'dupnames', but not 'source') from node or dictionary dict_.
walkTraverse a tree of Node objects, calling the dispatch_visit() method of visitor when entering each node.
walkaboutPerform a tree traversal similarly to Node.walk() (which see), except also call the dispatch_departure() method before exiting each node.
- __init__(rawsource='', *children, **attributes)¶
Attributes
__dict____weakref__list of weak references to the object
_documentbasic_attributesTuple of attributes which are defined for every Element-derived class instance and can be safely transferred to a different node.
child_text_separatorSeparator for child nodes, used by astext() method.
documentReturn the document root node of the tree containing this Node.
known_attributesTuple of attributes that are known to the Element base class.
lineThe line number (1-based) of the beginning of this Node in source.
list_attributesTuple of attributes that are automatically initialized to empty lists for all nodes.
local_attributesTuple of class-specific attributes that should not be copied with the standard attributes when replacing a node.
parentBack-reference to the Node immediately containing this Node.
sourcePath or description of the input source which generated this Node.
The element generic identifier.
rawsourceThe raw text from which this element was constructed.
childrenList of child nodes (elements and/or Text).
attributesDictionary of attribute {name: value}.
- tagname = 'TABLE'¶
The element generic identifier. If None, it is set as an instance attribute to the name of the class.
- __annotations__ = {}¶
- __doc__ = None¶
- __module__ = 'schedula.utils.drw.nodes'¶