API reference
python:astx:astx.callables.LambdaExpr
class LambdaExpr
LambdaExpr(body: Expr, params: Arguments = Arguments(), loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/callables.py:487
AST class for lambda expressions.
Attributes
-
kind — Kind of value or operation.; Type: ASTKind
-
params — Params.; Type: Arguments
-
body — Statements forming the body.; Type: Expr
-
loc — Type: SourceLocation
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
-
nbytes — Type: int
Methods
-
__init__ — Initialize the lambda expression.
-
__str__ — Return a string representation of the lambda expression.
-
get_struct — Return the AST structure of the lambda expression.