Skip to content

clarify Base.isidentifier docs (false for operator symbols)#42266

Merged
JeffBezanson merged 7 commits intomasterfrom
stevengj-patch-1
Sep 23, 2021
Merged

clarify Base.isidentifier docs (false for operator symbols)#42266
JeffBezanson merged 7 commits intomasterfrom
stevengj-patch-1

Conversation

@stevengj
Copy link
Copy Markdown
Member

Closes #42076.

@stevengj stevengj added the docs This change adds or pertains to documentation label Sep 15, 2021
@mcabbott
Copy link
Copy Markdown
Contributor

Maybe this should say "See also Base.isoperator"?

@stevengj
Copy link
Copy Markdown
Member Author

Added some "see also" lines. Note that this is exported by the Meta package, so we can refer to that rather than Base.

@stevengj
Copy link
Copy Markdown
Member Author

Hmm, cross-referencing to Meta doesn't work with the docsystem. 😢

@mcabbott
Copy link
Copy Markdown
Contributor

Sorry about the hassle. I'm a bit confused which module this is in. It seems to have a doc entry at https://docs.julialang.org/en/v1/base/base/#Base.isoperator, and:

julia> @which Base.isoperator
Base

julia> @which Base.isoperator(:+)
isoperator(s::Union{AbstractString, Symbol}) in Base at show.jl:1358

help?> Base.isoperator
  isoperator(s::Symbol)

  Return true if the symbol can be used as an operator, false otherwise.

  Examples
  ≡≡≡≡≡≡≡≡≡≡

  julia> Meta.isoperator(:+), Meta.isoperator(:f)
  (true, false)

@JeffBezanson JeffBezanson merged commit 2547a76 into master Sep 23, 2021
@JeffBezanson JeffBezanson deleted the stevengj-patch-1 branch September 23, 2021 19:13
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs This change adds or pertains to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[parsing] is "++" an identifier or not ?

3 participants