Aha, so when you say that the file name is treated as a namespace, you would so something like this? "mymodule.var1" for the first case, or "myclass.var1" for the second?
–
Dark TemplarOct 2 '11 at 4:08

Not exactly. The package still counts as part of the namespace. If you want to do what you said then you need to do from mypackage import mymodule.
–
Yam MarcovicOct 2 '11 at 10:42

If the filename is the namespace, what happens if you import two files which happen to have the same name?
–
Robert GrantNov 12 '14 at 6:35