Open hongyehu opened 1 year ago
This isn't a bug, it's a feature: whenever you call a Julia function from Python, the inputs and outputs are converted according to the documented rules.
The next major version is likely to change this however, so that the outputs are not converted and are always returned as a wrapped Julia value, so the above code does what you expect.
For now, you can do jl.Pair._jl_raw()(1, 2)._jl_any()
.
Or pair = jl.seval("pyjl(Pair(1, 2))"); pair(1, 2)
.
This issue has been marked as stale because it has been open for 60 days with no activity. If the issue is still relevant then please leave a comment, or else it will be closed in 7 days.
This issue has been closed because it has been stale for 7 days. You can re-open it if it is still relevant.
Affects: JuliaCall
Describe the bug In python, with
from juliacall import Main as jl
jl.Pair(1,2)
it will generate a tuple instead of julia pair like1=>2
.system info Please provide detailed information about your system: