Skip to content

Commit

Permalink
docs: add note about not implying being defined to names
Browse files Browse the repository at this point in the history
ref #51584
  • Loading branch information
nsajko committed Oct 4, 2023
1 parent 165f728 commit 13b8fab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions base/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ are also included.
As a special case, all names defined in `Main` are considered \"public\",
since it is not idiomatic to explicitly mark names from `Main` as public.
!!! note
`sym ∈ names(SomeModule)` does *not* imply `isdefined(SomeModule, sym)`,
because `names` will report a symbol that is exported from the module even if
the symbol is not defined.
See also: [`isexported`](@ref), [`ispublic`](@ref), [`@locals`](@ref Base.@locals), [`@__MODULE__`](@ref).
"""
names(m::Module; all::Bool = false, imported::Bool = false) =
Expand Down

0 comments on commit 13b8fab

Please sign in to comment.