We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7afdfd commit f8f8681Copy full SHA for f8f8681
src/plot3d.jl
@@ -6,7 +6,7 @@ mutable struct LazyPyModule
6
o::PyObject
7
LazyPyModule(n) = new(n, PyNULL())
8
end
9
-PyObject(m::LazyPyModule) = getfield(m.o, :o) == C_NULL ? copy!(m.o, pyimport(m.name)) : m.o
+PyObject(m::LazyPyModule) = ispynull(m.o) ? copy!(m.o, pyimport(m.name)) : m.o
10
pycall(m::LazyPyModule, args...; kws...) = pycall(PyObject(m), args...; kws...)
11
(m::LazyPyModule)(args...; kws...) = pycall(PyObject(m), PyAny, args...; kws...)
12
Base.Docs.doc(m::LazyPyModule) = Base.Docs.doc(PyObject(m))
0 commit comments