@@ -10,7 +10,7 @@ export pycall, pyimport, pybuiltin, PyObject,
10
10
import Base: size, ndims, similar, copy, getindex, setindex!, stride,
11
11
convert, pointer, summary, convert, show, haskey, keys, values,
12
12
eltype, get, delete!, empty!, length, isempty, start, done,
13
- next, filter!, hash, splice!, pop!, == , isequal, help, push!,
13
+ next, filter!, hash, splice!, pop!, == , isequal, push!,
14
14
unshift!, shift!, append!, insert!, prepend!, writemime, mimewritable
15
15
16
16
# Python C API is not interrupt-save. In principle, we should
@@ -156,8 +156,17 @@ function show(io::IO, o::PyObject)
156
156
print (io, " PyObject $(pystring (o)) " )
157
157
end
158
158
159
- function help (o:: PyObject )
160
- pycall (pybuiltin (" help" ), PyAny, o)
159
+
160
+ if VERSION < v " 0.4.0-dev+6471"
161
+ function Base. help (o:: PyObject )
162
+ pycall (pybuiltin (" help" ), PyAny, o)
163
+ end
164
+ else
165
+ function Base. Docs. doc (o:: PyObject )
166
+ Base. Docs. Text (haskey (o, " __doc__" ) ?
167
+ convert (AbstractString, o[" __doc__" ]) :
168
+ " Python object (no docstring found)" )
169
+ end
161
170
end
162
171
163
172
# ########################################################################
0 commit comments