While¶
- class astroid.nodes.While(lineno: int | None, col_offset: int | None, parent: NodeNG | None, *, end_lineno: int | None, end_col_offset: int | None)[source]¶
Bases:
MultiLineWithElseBlockNode
,Statement
Class representing an
ast.While
node.>>> import astroid >>> node = astroid.extract_node(''' while condition(): print("True") ''') >>> node <While l.2 at 0x7f23b2e4e390>