when I use python embedded in a Java application, I tried iterating through the inheritance hierarchy of the evaluation result. I tried using getMetaParents but hasMetaParents is false and getMetaParents therefore throws an error.
Example code:
try (Context context = Context.create()) {
Value value = context.eval("python", """
class A:
pass
class B(A):
pass
B()
""");
System.out.println(value.getMetaObject().hasMetaParents()); // prints false
}
Hello everyone,
when I use python embedded in a Java application, I tried iterating through the inheritance hierarchy of the evaluation result. I tried using getMetaParents but
hasMetaParents
is false andgetMetaParents
therefore throws an error.Example code:
GraalVM version: graalvm-jdk-21.0.3+7.1 Embedded python/polyglot version: 24.0.1