Closed namcsi closed 2 years ago
Thanks for finding this. It is a bug in the documentation.
Light
and RobotLocation
are not fields but they do have an associated field class that can be accessed with the .Field
class property. So the True
predicate definition should look like:
class True(Predicate):
fluent = combine_fields([Light.Field, RobotLocation.Field])
time = IntegerField
I will update the documentation.
In the clorm documentation, under Predicates and Fields -> Combining Field Definitions, there is a code snippet demonstrating how to use
combine_fields
to combine severalComplexTerm
subclasses:However, after correcting some syntax errors, the code snippet still throws a TypeError:
My clorm version is 1.3.8. Is the documentation out of date, is this a bug, or am I severely misunderstanding something?:)