DelAttr¶
- class astroid.nodes.DelAttr(attrname: str, lineno: int, col_offset: int, parent: NodeNG, *, end_lineno: int | None, end_col_offset: int | None)[source]¶
Bases:
ParentAssignNode
Variation of
ast.Delete
representing deletion of an attribute.>>> import astroid >>> node = astroid.extract_node('del self.attr') >>> node <Delete l.1 at 0x7f23b2e35f60> >>> list(node.get_children())[0] <DelAttr.attr l.1 at 0x7f23b2e411d0>
- attrname¶
The name of the attribute that is being deleted.