JuliaPy / PythonCall.jl

Python and Julia in harmony.
https://juliapy.github.io/PythonCall.jl/stable/
MIT License
715 stars 61 forks source link

pyjl #512

Closed cjdoris closed 1 week ago

cjdoris commented 1 week ago

Changes to the Julia wrapper types to mirror the Python wrapper types more.

e.g. Jl is the Python wrapper of Julia objects now, like Py is the Julia wrapper of Python objects. Jl behaves a lot like Py in that calling, attribute access, indexing, etc returns a Jl - there is no automatic conversion of the result. The old version (called AnyValue) converted the results to more native Python objects, which made code harder to reason about. Now doing stuff with Julia objects returns Julia objects uniformly.

e.g. JlVector is the replacement for VectorValue. Being more like a Python list, indexing into it does convert the items to Python, so indexing a JlVector wrapping a Vector{String} will return str.

Closes #404