If I have an object (say a method, or a struct, or a Type, imported with using), how can I get the module it was originally defined in?
If I have an object (say a method, or a struct, or a Type, imported with using), how can I get the module it was originally defined in?
You can use the parentmodule function. For example:
julia> parentmodule(rand)
Base
julia> parentmodule(versioninfo)
InteractiveUtils