JuliaPy / JuliaPy/PythonCall.jl
Converting objects; e.g. support dataclasses?
- Vorherrschende Sprache
- Julia
- Sterne
- 1.1k
- Forks
- 86
- Ø Merge
- 1 T. 22 Std.
- Gemergte PRs (30 T.)
- 3
Beschreibung
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.]
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start with docs/src/conversion-to-julia.md, especially the conversion table around lines 25-40, and inspect how tuples, NamedTuples, and PyDict are handled. Determine whether Python dataclasses and namedtuples are supported or need explicit conversion behavior, with the resulting support or documentation making the conversion rules clear.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- julia, python
- Bereich
- backend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100