You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the way to call Python operators from Chapel is to explicitly call the dunder method
use Python;
var interp =new Interpreter();
var pyInt1 = interp.toPython(10);
var pyInt2 = interp.toPython(11);
var res = pyInt1.call("__add__", pyInt2);
While this is a simple/silly example with plain integers, many libraries overload these dunder methods in interesting ways to create their user interfaces. Translitering these libraries in Chapel-Python interop can be awkward because of these dunder method calls.
However, we could support many of these Python operators as Chapel operators. For example
Currently, the way to call Python operators from Chapel is to explicitly call the dunder method
While this is a simple/silly example with plain integers, many libraries overload these dunder methods in interesting ways to create their user interfaces. Translitering these libraries in Chapel-Python interop can be awkward because of these dunder method calls.
However, we could support many of these Python operators as Chapel operators. For example
I think we should support as many of these dunder methods as we can
The text was updated successfully, but these errors were encountered: