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

ispynull #151

Closed
stevengj opened this issue Apr 12, 2022 · 1 comment
Closed

ispynull #151

stevengj opened this issue Apr 12, 2022 · 1 comment

Comments

@stevengj
Copy link
Member

Sometimes it is helpful to check whether we have a NULL python object, created via PythonCall.pynew(), e.g. to check if something has been initialized yet. (PyPlot needs this for lazy module loading, for example.) It might be nice to have a function like:

ispynull(x::Py) = PythonCall.getptr(x) == PythonCall.C.PyNULL

since this otherwise requires you access PythonCall internals.

@cjdoris
Copy link
Collaborator

cjdoris commented Apr 21, 2022

@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