JuliaPy / JuliaPy/PythonCall.jl

Converting objects; e.g. support dataclasses?

Ouverte
#567 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Julia
Étoiles
1.1k
Forks
86
Merge moyen
1 j 22 h
PR mergées (30 j)
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.]

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.