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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With