Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using functions ending with ! in juliacall #158

Closed
gpucce opened this issue Apr 15, 2022 · 1 comment
Closed

using functions ending with ! in juliacall #158

gpucce opened this issue Apr 15, 2022 · 1 comment

Comments

@gpucce
Copy link

gpucce commented Apr 15, 2022

I used to use juliacall.using to rename function ending with ! to be ending with ___ and so acceptatble in python how can I do it now that using is not there anymore?

@cjdoris
Copy link
Collaborator

cjdoris commented Apr 21, 2022

Yeah sorry, I'm trying to make the API smaller, so removed that along with some other things.

For the special case of functions ending with ! you can replace it with _b (for "bang"), so for example juliacall.Base.push_b is Base.push!.

In general, you can use getattr to get Julia properties whose names are not valid Python identifiers, such as getattr(juliacall.Base, "push!") or getattr(juliacall.Base, "+").

@cjdoris cjdoris closed this as completed Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants