JuliaPy / JuliaPy/PythonCall.jl

Converting objects; e.g. support dataclasses?

Open
#567 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Julia
Stars
1.1k
Forks
86
Avg merge
1d 22h
Merged PRs (30d)
3

Description

I think, though not sure, that dataclasses are very important in (modern) Python (supported in all current Python, i.e. since 3.7), and they basically map to Julia's structs (or well could), so do they need special support in this project? I don't see them in the table:

https://github.com/JuliaPy/PythonCall.jl/blob/a61c0223a60b803016e51a0dde39371222abf773/docs/src/conversion-to-julia.md?plain=1#L25-L40

I do see Python also has namedtuples, an alternative, not clear to me if either supported. I see tuples are, and something gets converted to Julia's NamedTuples. And PyDict. Python dictionaries are ordered, so I think PyDict supports that (converting from; and to Python likely also not problematic), otherwise mapping to Dict, simply would have been chosen?

[I see Python has now an *internal* C API (not public API) to get UTF-8 data, so maybe something better could be done for passing strings back end forth.]

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.