PyDocs

Nav

Python Language Services

IfExp

ast

class
  • IfExp(test, body, orelse)
IfExp(expr test, expr body, expr orelse)
1 Example
>>> print(ast.dump(ast.parse('a if b else c', mode='eval'), indent=4))
Expression(
    body=IfExp(
        test=Name(id='b'),
        body=Name(id='a'),
        orelse=Name(id='c')))
from the Python docs
See Also
No see-alsos for ast/IfExp
0 Notes
No notes for IfExp