Skip to content

Commit 9485f2d

Browse files
committed
add inspect for non-symbolic objects so user code does not have to check
1 parent 1bac99f commit 9485f2d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/inspect.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ function inspect(io::IO, x::Symbolic;
5555
hint && print(io, "\n\nHint: call SymbolicUtils.pluck(expr, line_number) to get the subexpression starting at line_number")
5656
end
5757

58-
function inspect(x::Symbolic; hint=true, metadata=inspect_metadata[])
58+
function inspect(x; hint=true, metadata=inspect_metadata[])
5959
inspect(stdout, x; hint=hint, metadata=metadata)
6060
end
6161

62+
inspect(io::IO, x; kw...) = println(io, "Not Symbolic: $x")
63+
6264
"""
6365
pluck(expr, n)
6466

0 commit comments

Comments
 (0)