Keyword¶
- class astroid.nodes.Keyword(arg: str | None, lineno: int | None, col_offset: int | None, parent: NodeNG, *, end_lineno: int | None, end_col_offset: int | None)[source]¶
Bases:
NodeNG
Class representing an
ast.keyword
node.>>> import astroid >>> node = astroid.extract_node('function(a_kwarg=True)') >>> node <Call l.1 at 0x7f23b2e9e320> >>> node.keywords [<Keyword l.1 at 0x7f23b2e9e9b0>]
- arg¶
The argument being assigned to.