# Isa function error in jupyter notebook

**URL:** <https://discourse.julialang.org/t/isa-function-error-in-jupyter-notebook/18132>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 29, 2018, 10:37am UTC](https://discourse.julialang.org/t/isa-function-error-in-jupyter-notebook/18132 "2018-11-29T10:37:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Post date:** [November 29, 2018, 10:37am UTC](https://discourse.julialang.org/t/isa-function-error-in-jupyter-notebook/18132/1 "2018-11-29T10:37:08Z")

</div>

```julia
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.

---

<div class="post-metadata">

**Author:** ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Post date:** [November 29, 2018, 12:06pm UTC](https://discourse.julialang.org/t/isa-function-error-in-jupyter-notebook/18132/2 "2018-11-29T12:06:28Z")

</div>

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.

```julia
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`.

```

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [November 29, 2018, 2:07pm UTC](https://discourse.julialang.org/t/isa-function-error-in-jupyter-notebook/18132/3 "2018-11-29T14:07:17Z")

</div>

> [@Ajaychat3](#):
>
> 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.

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.)

---

<div class="post-metadata">

**Author:** ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)\
**Post date:** [November 29, 2018, 4:11pm UTC](https://discourse.julialang.org/t/isa-function-error-in-jupyter-notebook/18132/4 "2018-11-29T16:11:40Z")

</div>

Thanks @stevengj.
