inverse_property attribute of symmetric properties

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

inverse_property attribute of symmetric properties

Stefan
Hi,

it seems that the inverse_property attribute of symmetric properties is empty if there is no manually defined inverse. Would it be possible to automatically add itself to inverse_property if a property is symmetric?
It would allow for very easy checking if there is any inverse property, defined via symmetry or otherwise.

# What we have right now
with onto:
    class Test(ObjectProperty, SymmetricProperty):
        pass

print(onto.Test.inverse_property)
# prints "False"

# What I would like to have
with onto:
    class Test(ObjectProperty, SymmetricProperty):
        pass

print(onto.Test.inverse_property)
[onto.Test]
Reply | Threaded
Open this post in threaded view
|

Re: inverse_property attribute of symmetric properties

Jiba
Administrator
Hi,

Ok, I've added that in the development version.

Jiba