Re: After import, some submodules are accessible and some aren't

2016-10-28 Thread Steve D'Aprano
On Sat, 29 Oct 2016 08:24 am, John Gordon wrote: > After importing a module, I can access some of its submodules directly > but others require an explicit import of the submodule. [...] > Why the difference? Ask the author of the package. Try this experiment: create a package called "imptest" w

Re: After import, some submodules are accessible and some aren't

2016-10-28 Thread Chris Angelico
On Sat, Oct 29, 2016 at 8:24 AM, John Gordon wrote: > After importing a module, I can access some of its submodules directly > but others require an explicit import of the submodule. > > As an example, see ldap.dn and ldap.modlist: > > % python > Python 2.7.8 (default, Aug 4 2016, 09:29:33) > [GC