OK, my mistake; when it prints print("Generalization subClass: " + mySubClass.get_name()), It is actually printing the class name from which the generalization link is leaving, so what I meant is that the Class is the subclass of the SuperClass, not that the code is giving you the subclasses of the current class.
About your question on e_inverse returning nothing: there is no “type” relations between classes in Capella, so the code is giving you nothing. The easiest way for you to navigate in reverse Associations and Generalizations is probably this (it is using the queries from the semantic browser that already calculate the reverse links):
for element in capella_query_by_name(myClass, "Typing Elements"):
if isinstance(element, Class):
print(element.get_name())
for element in capella_query_by_name(myClass, "Generalizing Elements"):
if isinstance(element, Class):
print(element.get_name())
Stephane Lacrampe
Obeo Canada