This came up on slack when we were trying to create a Symbol("true") via :true.
julia> :true === true
true
julia> :true == Symbol("true")
false
julia> Symbol("true")
:true
@Keno proposed to change to printing to Symbol("true"), to make it clear that the symbol can't be created by using :. Further, Symbol(true) and the symbols of false should probably be handled the same, since the docstring for Symbol states that the string representation of the arguments is used to create the symbol.
help?> Symbol
search: Symbol
Symbol(x...) -> Symbol
Create a Symbol by concatenating the string representations of the arguments together.
Sounds good to me and would help explain:
julia> Symbol(true) == Symbol("true")
true
Especially since
julia> Symbol(1)
Symbol("1")
it would make since for
julia> Symbol(true)
Symbol("true")
Bug fix or minor change? I would probably lean towards minor change to be safe.
I will look into it if you don't mind.
Can I be assigned this?
There is already a PR: #32006
Fixed by #32006