Expr#

class astroid.nodes.Expr(lineno: int | None, col_offset: int | None, parent: NodeNG | None, *, end_lineno: int | None, end_col_offset: int | None)[source]#

Bases: Statement

Class representing an ast.Expr node.

An Expr is any expression that does not have its value used or stored.

>>> import astroid
>>> node = astroid.extract_node('method()')
>>> node
<Call l.1 at 0x7f23b2e352b0>
>>> node.parent
<Expr l.1 at 0x7f23b2e35278>
get_children()[source]#

Get the child nodes below this node.

postinit(value: NodeNG) None[source]#
value: NodeNG#

What the expression does.