Skip to content

Commit f38b6fc

Browse files
committed
Update varinfo() docstring signature
The default for `m` is no longer `Main`.
1 parent 38520e1 commit f38b6fc

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

stdlib/InteractiveUtils/src/InteractiveUtils.jl

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,24 @@ include("macros.jl")
2121
include("clipboard.jl")
2222

2323
"""
24-
varinfo(m::Module=Main, pattern::Regex=r""; all=false, imported=false, recursive=false, sortby::Symbol=:name, minsize::Int=0)
24+
varinfo(m::Module = Base.active_module(), pattern::Regex = r""; <keyword arguments>)
2525
2626
Return a markdown table giving information about exported global variables in a module, optionally restricted
2727
to those matching `pattern`.
2828
2929
The memory consumption estimate is an approximate lower bound on the size of the internal structure of the object.
3030
31-
- `all` : also list non-exported objects defined in the module, deprecated objects, and compiler-generated objects.
32-
- `imported` : also list objects explicitly imported from other modules.
33-
- `recursive` : recursively include objects in sub-modules, observing the same settings in each.
34-
- `sortby` : the column to sort results by. Options are `:name` (default), `:size`, and `:summary`.
35-
- `minsize` : only includes objects with size at least `minsize` bytes. Defaults to `0`.
31+
# Arguments
3632
37-
The output of `varinfo` is intended for display purposes only. See also [`names`](@ref) to get an array of symbols defined in
38-
a module, which is suitable for more general manipulations.
33+
- `all::Bool=false`: also list non-exported objects defined in the module, deprecated objects, and compiler-generated objects?
34+
- `imported::Bool=false`: also list objects explicitly imported from other modules?
35+
- `recursive::Bool=false`: recursively include objects in sub-modules, observing the same settings in each?
36+
- `sortby::Symbol=:name`: the column to sort results by: `:name`, `:size`, or `:summary`
37+
- `minsize::Int=0`: only include objects with size at least `minsize` bytes
38+
39+
The output of `varinfo` is intended for display purposes only. See also [`names`](@ref)
40+
to get an array of symbols defined in a module, which is suitable for more general
41+
manipulations.
3942
"""
4043
function varinfo(m::Module=Base.active_module(), pattern::Regex=r""; all::Bool = false, imported::Bool = false, recursive::Bool = false, sortby::Symbol = :name, minsize::Int=0)
4144
sortby in (:name, :size, :summary) || throw(ArgumentError("Unrecognized `sortby` value `:$sortby`. Possible options are `:name`, `:size`, and `:summary`"))

0 commit comments

Comments
 (0)