Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
Sep 23, 2021

Conversation

stevengj
Copy link
Member

Closes #42076.

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

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

@stevengj
Copy link
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
Member Author

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

@mcabbott
Copy link
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