Python porting to Julia resources

I think it would be best to just follow the current layout (a bunch of bullet points). Maybe organize them a bit by topic.

Also, I am not sure that constructing a very detailed “dictionary” (function names etc) is either feasible or desirable. After all, they are two different languages. The focus should be on conceptual issues.

1 Like

Some enhancements to my table (on Gist because it became too long for this thread).

I agree that the conceptual / code structure parts are most important. Imho the largest syntactical difference between Python and Julia is classical OOP classes vs. structures and multiple dispatch. This point is not yet included in the Noteworthy Differences.

1 Like

I am preparing a PR for additional points into the documentation.
Is it OK for you if I include your points, too?

Sure. please add them to the PR.

Thanks.

Here is my first version (including the points of @raff):
https://github.com/lungben/julia/blob/patch-1/doc/src/manual/noteworthy-differences.md

I am happy to invite more collaborators!

In Python 0, None, empty list are evaluated to logical False. In Julia, you need explicit conversion to Bool.

In Julia, a new local scope is introduced by most code blocks, including loops, try-catch-finally, and comprehensions.

Thanks, good points. Adding them.

Created a PR
https://github.com/JuliaLang/julia/pull/35268
Thanks for your suggestions, comments and additions to the PR are welcome!

5 Likes

I’m very late to the discussion, but maybe it is also worth mentioning that there are some transpilers that translate a subset of Python to Julia:
Py2JL: GitHub - JuliaCN/Py2Jl.jl: Python to Julia transpiler.
Py2Many: https://github.com/py2many/py2many
FromPython: https://github.com/kskyten/FromPython.jl
(Disclaimer: I am currently contributing to develop Py2Many)

This might also be related to the following discussion: Python to Julia transpiler

1 Like