-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
docstrings for Base, Core, Main, Module #31131
Conversation
base/docs/basedocs.jl
Outdated
|
||
The base library of Julia. `Base` is a module that contains basic functionality (the contents of `base/`). All modules implicitly contain `using Base`, since this is needed in the vast majority of cases. | ||
""" | ||
kw"Base" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why these would be handled like keywords. Can we attach the doc strings to the modules themselves instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that kw"Base"
was introduced before this PR. I guess maybe for some kind of bootstrap reason? Anyway in case of Main
and Core
I needed to do this in order to make e.g.
help?> Core
work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I get, if I remove kw
:
help?> Base
search: Base basename AbstractSet Broadcast broadcast broadcast! AbstractString AbstractDisplay set_zero_subnormals get_zero_subnormals
No documentation found.
No docstring found for module Base.
help?> Main
search: Main DomainError maxintfloat SegmentationFault maximum maximum! Matrix BitMatrix mapslices DenseMatrix timedwait StridedMatrix
No documentation found.
No docstring found for module Main.
help?> Core
search: Core isconcretetype searchsorted searchsortedlast searchsortedfirst code_lowered @code_lowered StackOverflowError code_warntype
No documentation found.
No docstring found for module Core.
help?> Main.Core
No documentation found.
No docstring found for module Core.
help?> Core.Main
Main
Main is the top-level module, and Julia starts with Main set as the current module. Variables defined at the prompt go in Main, and
varinfo lists variables in Main.
julia> @__MODULE__
Main
help?> Main.Base
No documentation found.
No docstring found for module Base.
help?> Base
search: Base basename AbstractSet Broadcast broadcast broadcast! AbstractString AbstractDisplay set_zero_subnormals get_zero_subnormals
No documentation found.
No docstring found for module Base.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. It seems to work if you document a module's "self binding", i.e. Base.Base
, Core.Core
, and Core.Main.Main
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, it works!
Looks good to me. @fredrikekre: looks like all your requested changes have been resolved. Please merge if you're good with this now. |
Towards #26919