Python

ExplanationKind

ExplanationKind class and enum members in the unified Python API.

Enum: ExplanationKind

Python · enumSince v0.10.0
ExplanationKindIntFlag
IntFlag selecting optional reusable session explanation storage. TRUE | FALSE uses one shared workspace, not two. Zero reserves none; when a workspace is selected, requesting an omitted kind is rejected without allocating a fallback.
Members
TRUE0x1
Reserve reusable storage for true-fact explanations.
FALSE0x2
Reserve reusable storage for false-fact explanations.
Example
from maelys_datalog import ExplanationKind

session = ruleset.prepare(
    explanations=ExplanationKind.TRUE | ExplanationKind.FALSE,
)
print("explanations:", hex(ExplanationKind.TRUE | ExplanationKind.FALSE))

Usage guides