How to retrieve direct instances of a class?

Posted by S04dEGR4gE on
URL: http://owlready.306.s1.nabble.com/How-to-retrieve-direct-instances-of-a-class-tp763.html

This will return individuals of a class and children of a class. Could anybody show me if there is a way to only return the individuals directly annotated to a class?

>>> from owlready2 import default_world
>>> default_world.set_backend(filename = 'helis_v1.10.sq3')
>>> default_world.search_one(label='Red Meat').instances()