Does methodswith
only return names that have been exported into the Main namespace? Even the methodswith(type, Module)
form only returns methods of functions which already exist in the Main namespace.
Concretely: XLSX doesn't export any of its functions, including sheetnames
. If I've done using XLSX
and have a XLSXFile
object x
, then methodswith(typeof(x), XLSX)
returns nothing (0-element Vector{Method}
), even though XLSX.sheetnames
accepts XLSXFile
objects.
methodswith(typeof(x))
without specifying a module returns methods of functions like close
and getindex
, functions which already exist in Main but which have methods in XLSX.
Is there a way to get the list of the methods that accept an XLSXFile
, whether or not their names exist in Main? (Doing XLSX
followed by Alt-M
to change the current module doesn't change the above behaviour either, which is what led me to believe methodswith
is operating based on the Main
namespace specifically, and not whatever the current namespace happens to be.)
yes. imho that's a bug or at the very least warrants an additional all
kwarg
also see https://github.com/JuliaLang/julia/issues/33866
Last updated: Dec 28 2024 at 04:38 UTC