API Reference¶
- class genpy.Generable[source]¶
A base class for AST nodes capable of generating code.
- class genpy.Suite(contents: Iterable[Generable] | Generable | None = None)[source]¶
Bases:
Generable
- class genpy.Collection(contents: Iterable[Generable] | Generable | None = None)[source]¶
Bases:
Suite
Like
Suite
, but does not lead to indentation.
Block nodes¶
- class genpy.Class(name: str, bases: Iterable[str], attributes: Iterable[Generable])[source]¶
Bases:
Generable
A class definition.
- class genpy.If(condition: str, then_: Generable, else_: Generable | None = None)[source]¶
Bases:
Generable
An
if/then/else
block.
- class genpy.CustomLoop(intro_line: str | None, body: Generable, outro_line: str | None = None)[source]¶
Bases:
Loop