Isa function error in jupyter notebook

in notebook
isa(1, Int)
Invalid @var syntax `extra token after end of expression`.

1 isa Number
Invalid @var syntax `extra token after end of expression`.

at REPL
julia> isa(1, Number)
true

PS: Same issue with isdigit(“9”) in jupyter notebook. not tested other is() functions but could be an issue with all.

I seem to have discovered the reason for this. The problem is reproduced below. The issue occurs when e.g. ?isa and isa(1,Number) are given in same cell in notebook in the same order or reverse order.

1.
isless("β", "α")
isa(1,Number)
true

2.
?isinteger
isinteger(4.0)
Invalid @var syntax `extra token after end of expression`.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] splitexpr(::Any) at .\docs\bindings.jl:28
 [3] bindingexpr(::Any) at .\docs\bindings.jl:17
 [4] lookup_doc(::Expr) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\docview.jl:137
 [5] docm(::LineNumberNode, ::Module, ::Any) at .\docs\Docs.jl:501
 [6] @doc(::LineNumberNode, ::Module, ::Expr, ::Vararg{Expr,N} where N) at .\boot.jl:451
 [7] eval at .\boot.jl:319 [inlined]
 [8] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\chatura\.julia\packages\IJulia\DL02A\src\execute_request.jl:61
 [9] #invokelatest#1 at .\essentials.jl:697 [inlined]
 [10] invokelatest at .\essentials.jl:696 [inlined]
 [11] eventloop(::ZMQ.Socket) at C:\Users\chatura\.julia\packages\IJulia\DL02A\src\eventloop.jl:8
 [12] (::getfield(IJulia, Symbol("##12#15")))() at .\task.jl:259

3.
isequal([1., NaN], [1., NaN])
true

4.
isinteger(4.0)
true

5.
?isinteger
isinteger(4.0)
Invalid @var syntax `extra token after end of expression`.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] splitexpr(::Any) at .\docs\bindings.jl:28
 [3] bindingexpr(::Any) at .\docs\bindings.jl:17
 [4] lookup_doc(::Expr) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\docview.jl:137
 [5] docm(::LineNumberNode, ::Module, ::Any) at .\docs\Docs.jl:501
 [6] @doc(::LineNumberNode, ::Module, ::Expr, ::Vararg{Expr,N} where N) at .\boot.jl:451
 [7] eval at .\boot.jl:319 [inlined]
 [8] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\chatura\.julia\packages\IJulia\DL02A\src\execute_request.jl:61
 [9] #invokelatest#1 at .\essentials.jl:697 [inlined]
 [10] invokelatest at .\essentials.jl:696 [inlined]
 [11] eventloop(::ZMQ.Socket) at C:\Users\chatura\.julia\packages\IJulia\DL02A\src\eventloop.jl:8
 [12] (::getfield(IJulia, Symbol("##12#15")))() at .\task.jl:259

6.
isinteger(4.0)
?isinteger
syntax: invalid identifier name "?"

7. 
?isinteger
# isinteger(4.0)

Invalid @var syntax `extra token after end of expression`.

In IJulia, help queries with ? have to be in a cell by themselves.

(You can also get pop-up help for the symbol at the cursor position by typing shift-tab.)

1 Like

Thanks @stevengj.