The equivalent AST factory for :code:`ast.Boolop` nodes to :code:`_binop`. :code:`ast.Boolop` nodes typically represent bitshift, bitand, and similar operations on integers. :code:`ast.Boolop` node fields are :code:`(left,op,right)`. Only one right-hand comparison is allowed,
(self: NumExpr, node: ast.AST)
| 1358 | return _binop(self, node) |
| 1359 | |
| 1360 | def _boolop(self: NumExpr, node: ast.AST) -> NumReg: |
| 1361 | ''' |
| 1362 | The equivalent AST factory for :code:`ast.Boolop` nodes to :code:`_binop`. |
| 1363 | :code:`ast.Boolop` nodes typically represent bitshift, bitand, and similar |
| 1364 | operations on integers. |
| 1365 | |
| 1366 | :code:`ast.Boolop` node fields are :code:`(left,op,right)`. Only one |
| 1367 | right-hand comparison is allowed, use brackets to break up multiple |
| 1368 | comparisons. |
| 1369 | ''' |
| 1370 | if len(node.values) != 2: |
| 1371 | raise ValueError('NumExpr3 supports binary logical operations only, please separate operations with ().' ) |
| 1372 | node.left = node.values[0] |
| 1373 | node.right = node.values[1] |
| 1374 | return _binop(self, node) |
| 1375 | |
| 1376 | def _unaryop(self: NumExpr, node: ast.AST) -> NumReg: |
| 1377 | ''' |
nothing calls this directly
no test coverage detected
searching dependent graphs…