|
This post was updated on Jul 04, 2019; 5:54am.
Hi~
Is it meaningful to define relations as follows, with two '>>'s? It is convenient to extend the domain/range of relations, esp. in dynamic way.
with society:
class Person(Thing):
pass
class Cat(Thing):
pass
class Dog(Thing):
pass
class love_(Dog >> Cat, Person >> Person):
pass
class love(Cat >> Dog, Person >> Person):
inverse_property = love_
p = Person('p')
c = Cat('c')
d=Dog('d')
c.love.append(p)
close_world(society)
sync_reasoner(debug=0)
|