-
Notifications
You must be signed in to change notification settings - Fork 135
Closed
Description
public class MyClass {
private final String str;
public MyClass(String str) {
this.str = str;
}
@Override
public String toString() {
return str;
}
}
I would expect calling:
context.getPolyglotBindings().putMember("obj", new MyClass("HI"));
context.eval("python",
"""
import polyglot
obj = polyglot.import_value("obj")
print(obj)
""");
That it would print "HI" and not <JavaObject[MyClass] at 0xdeadbeef>
Is there a way to make it print it as a string? I've tried using Python's str().
Metadata
Metadata
Assignees
Labels
No labels