INDIRECT_is_a dose not work as I thought. (closed)
This post was updated on .
Following is the code.
property: love: Person->Person
class love(Person >> Person):
Person.is_a.append(love.some(Person)) # a person loves someone.
x = Person('x')
print(love.some(Person) in Person.is_a) # True
print(Person in x.INDIRECT_is_a) # True
print(love.some(Person) in x.INDIRECT_is_a) # False, excepted to be True, since x loves someone
print(love.some(Person) in x.INDIRECT_is_instance_of) # False
print(x in x.love) # False
while, following is OK
equivalent_to = [Person & love.some(Person)]
print(love_person in x.INDIRECT_is_instance_of) # True, however, it is equivalent to the statement above
An additional question is that Person has no INDIRECT_is_a property.