|
Hi,
I am trying to use Owlready2 to get subclasses (or descendants) of a class.
The class.descendants() allows to get all the direct classes and the subclasses of these classes.
I need only to get the direct classes without the subclasses. For exemple, if I have a class A and B, C are subclasses of A, and B1 subclass of B, C2 subclass of C :
A.descendants() get [B, C, B1, C1]. What I need is [B, C] only.
Thanks
|