BoolOp#

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

Bases: NodeNG

Class representing an ast.BoolOp node.

A BoolOp is an application of a boolean operator.

>>> import astroid
>>> node = astroid.extract_node('a and b')
>>> node
<BinOp l.1 at 0x7f23b2e71c50>
get_children()[source]#

Get the child nodes below this node.

op: str#

The operator.

op_precedence()[source]#
postinit(values: list[NodeNG] | None = None) None[source]#

Do some setup after initialisation.

Parameters:

values – The values being applied to the operator.

values: list[NodeNG]#

The values being applied to the operator.