Skip to content

Commit

Permalink
Add note to names docstring about not implying isdefined (#51593)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsajko committed Jan 20, 2024
1 parent 32534dd commit 8bb0109
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. Names are returned in sorted order.
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)`.
`names` will return symbols marked with `public` or `export`, even if
they are not defined in the module.
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 8bb0109

Please sign in to comment.