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
Supports this code:
widget: @python type
= {
value: int;
operator=: (out this, i: int) = { value = i; }
add: (inout this, i: int) -> int
= { value += i; return value; }
shout: (this, s: std::string) -> std::string
= s + "!";
}
Being invoked from Python like this:
import widgetlib
w = widgetlib.widget(10)
print(w.add(5)) # prints 15
print(w.add(i=7)) # prints 22
print(w.shout("hello")) # prints "hello!"
I'm not checking in a test case though because this is proof-of-concept only, currently hardwired to generate pybind11 and bash .sh invoking g++-10
0 commit comments