PyDocs

Nav

Python Language Services

While

ast

class
  • While(test, body, orelse)
While(expr test, stmt* body, stmt* orelse)
1 Example
>>> print(ast.dump(ast.parse("""
... while x:
...    ...
... else:
...    ...
... """), indent=4))
Module(
    body=[
        While(
            test=Name(id='x'),
            body=[
                Expr(
                    value=Constant(value=Ellipsis))],
            orelse=[
                Expr(
                    value=Constant(value=Ellipsis))])])
from the Python docs
See Also
No see-alsos for ast/While
0 Notes
No notes for While