On Sun, May 29, 2016 at 8:44 PM, Cedric St-Jean <[email protected]> wrote: > This is probably a conscious decision, but I was surprised that, for any > module (eg. PyCall):
Yes, `Main` is the central place where all imported modules are defined. This directly follows that toplevel modules are evaluated in `Main` (i.e. if you put any code outside the `module Foo end` in `Foo.jl` in package `Foo`, the code is executed in `Main`.) > > module A > import PyCall > end > > PyCall # no error - PyCall was brought into Main > > whereas > > module A > import PyCall > end > > module B > PyCall # error - PyCall not defined > end > > Furthermore > > PyCall = 0 > > module B > using PyCall # LoadError: invalid module path (PyCall does not name a > module) > end > > Is there some issue discussing this? It tripped me up while debugging a > macro.
