Term
- class Term(*args, **kwargs)[source]
Bases:
KIF_Object
Abstract base class for terms.
- class ClosedTerm(*args, **kwargs)[source]
Bases:
Term
Abstract base class for closed (ground) terms.
- class OpenTerm(*args, **kwargs)[source]
Bases:
Term
Abstract base class for open terms.
- object_class: ClassVar[type[ClosedTerm]]
Closed-term class associated with this open-term class.
- class Template(*args, **kwargs)[source]
Bases:
OpenTerm
Abstract base class for templates.
- object_class: ClassVar[type[ClosedTerm]]
Object class associated with this template class.
- class Variable(name: str, variable_class: type[Variable] | type[Term] | None = None)[source]
Bases:
OpenTerm
Base class for variables.
- Parameters:
name – Name.
variable_class – Variable class.
- classmethod check(arg: Any, function: Callable[[...], Any] | str | None = None, name: str | None = None, position: int | None = None) Self [source]
Coerces arg into an instance of this class.
If arg cannot be coerced, raises an error.
- Parameters:
arg – Value.
function – Function or function name.
name – Argument name.
position – Argument position.
- Returns:
Object.
- property name: str
The name of variable.
- object_class: ClassVar[type[ClosedTerm]]
Closed-term class associated with this open-term class.