IfExp¶
- class astroid.nodes.IfExp(lineno: int | None, col_offset: int | None, parent: NodeNG | None, *, end_lineno: int | None, end_col_offset: int | None)[source]¶
Bases:
NodeNG
Class representing an
ast.IfExp
node. >>> import astroid >>> node = astroid.extract_node(‘value if condition else other’) >>> node <IfExp l.1 at 0x7f23b2e9dbe0>