Skip to main content
added 6 characters in body
Source Link
Fred Foo
  • 365.3k
  • 80
  • 765
  • 852

This is a design decision by the cime (whatever that is) developers. A package does not magically import all of its subpackages. That's a good thing, because otherwise large packages like SciPy would take forever to import (like NLTK does).

Some packages, like os.path, NumPy and NLTK will import submodules, but they do so explicitly. If you want this to happen in your own module, do

# __init__.py import .submodule 

This is a design decision by the cime (whatever that is) developers. A package does not magically import all of its subpackages. That's a good, because otherwise large packages like SciPy would take forever to import (like NLTK does).

This is a design decision by the cime (whatever that is) developers. A package does not magically import all of its subpackages. That's a good thing, because otherwise large packages like SciPy would take forever to import (like NLTK does).

Some packages, like os.path, NumPy and NLTK will import submodules, but they do so explicitly. If you want this to happen in your own module, do

# __init__.py import .submodule 
Source Link
Fred Foo
  • 365.3k
  • 80
  • 765
  • 852

This is a design decision by the cime (whatever that is) developers. A package does not magically import all of its subpackages. That's a good, because otherwise large packages like SciPy would take forever to import (like NLTK does).