I see, Main is a special case. Now the following makes sense to me...
julia> isdefined(:PyPlot)
false
julia> module B
module B1
using PyPlot
end
end
INFO: Loading help data...
julia> isdefined(Main,:PyPlot)
true
julia> isdefined(B,:PyPlot)
false
julia> isdefined(B.B1,:PyPlot)
true
Thanks,
--Peter
On Tuesday, June 3, 2014 4:13:18 PM UTC-7, Stefan Karpinski wrote:
>
> In Jeff's original implementation there was a largely inaccessible Root
> module that was where all the top-level bindings existed – mostly just
> bindings to other modules. However, if I recall correctly, I convinced him
> to just merge Main and Root instead. That's why all loaded top-level
> modules show up in Main.
>
> On Tuesday, June 3, 2014, Peter Simon <[email protected] <javascript:>>
> wrote:
>
>> I thought that "using" within a module would not affect the name space of
>> the enclosing module. Could someone please explain why PyPlot is visible
>> in Main after executing the lines below?
>>
>> julia> isdefined(:PyPlot)
>> false
>>
>>
>> julia> module A
>> using PyPlot
>> end
>> INFO: Loading help data...
>>
>>
>> julia> current_module()
>> Main
>>
>>
>> julia> isdefined(:PyPlot)
>> true
>>
>>
>> Thanks,
>> --Peter
>>
>