pytools.expression.composite.Call#
- class pytools.expression.composite.Call(callee, *args, **kwargs)[source]#
A call expression.
- Bases:
- Metaclasses:
- Parameters:
Method summary
Create a logical and expression using this and another expression as operands.
Compare this expression with another for equality.
Calculate the hash code for this expression.
Create a logical not expression using this expression as the operand.
Create a logical or expression using this and another expression as operands.
Render this object as an expression.
Attribute summary
The expression representing the arguments enclosed by brackets.
The expression being called; identical with the prefix of this expression.
The precedence of this expression, used to determine the need for parentheses.
The prefix of this expression.
One or more characters separating the prefix and the subexpression.
A tuple containing the prefix and the body of this expression.
Definitions
- __call__(*args, **kwargs)#
Generate a
Callexpression.- Return type:
- Returns:
the resulting expression
- and_(other)#
Create a logical and expression using this and another expression as operands.
- Parameters:
other (
Expression) – other operand to combine with this expression using a logical and- Return type:
- Returns:
the logical and expression
- eq_(other)#
Compare this expression with another for equality.
For using Python’s native equality operator
==, seeFrozenExpression.- Parameters:
other (
Expression) – the expression to compare this expression with- Return type:
- Returns:
Trueif both expressions are equal;Falseotherwise
- hash_()#
Calculate the hash code for this expression.
For using Python’s native
hashfunction, seeFrozenExpression.- Return type:
- Returns:
the hash code for this expression
- not_()#
Create a logical not expression using this expression as the operand.
- Return type:
- Returns:
the logical not expression
- or_(other)#
Create a logical or expression using this and another expression as operands.
- Parameters:
other (
Expression) – other operand to combine with this expression using a logical or- Return type:
- Returns:
the logical or expression
- to_expression()#
Render this object as an expression.
- Return type:
- Returns:
the expression representing this object
- property body_: CollectionLiteral#
The expression representing the arguments enclosed by brackets.
- property callee_: Expression#
The expression being called; identical with the prefix of this expression.
- property precedence_: int#
The precedence of this expression, used to determine the need for parentheses.
- property prefix_: Expression#
The prefix of this expression.
- property subexpressions_: tuple[Expression, ...]#
A tuple containing the prefix and the body of this expression.