Axioms¶
didactic.api.axiom ¶
axiom(
expr: str,
*,
message: str | None = None,
name: str | None = None,
) -> Axiom
Construct an Axiom for a class's __axioms__.
| PARAMETER | DESCRIPTION |
|---|---|
expr
|
The axiom expression. Free variables are field names of the enclosing Model.
TYPE:
|
message
|
Optional human-readable explanation surfaced when the axiom fails validation.
TYPE:
|
name
|
Optional identifier. Defaults to the metaclass synthesising one from the expression text.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Axiom
|
A frozen Axiom record. Place it in the class's |
Examples:
didactic.api.Axiom
dataclass
¶
A class-level axiom expressed as a string.
| PARAMETER | DESCRIPTION |
|---|---|
expr
|
The axiom expression in panproto-Expr-shaped surface syntax.
TYPE:
|
message
|
Optional human-readable message surfaced in didactic.api.ValidationError when the axiom fails.
TYPE:
|
name
|
Optional identifier; defaults to a generated label.
TYPE:
|
See Also
axiom : the convenience constructor.