API reference
python:astx:astx.YieldStmt
class YieldStmt
YieldStmt(value: Optional[Expr] = None, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/callables.py:820
Declared as: python:astx:astx.callables.YieldStmt
AST class for yield statement.
Attributes
-
kind — Type: ASTKind
-
value — Type: Optional[Expr]
Methods
-
__init__ — Initialize the YieldStmt instance.
-
__str__ — Return a string representation of the object.
-
get_struct — Return the AST structure of the object.