Some libraries in Python are organized as a hierarchy of submodules. What are the pros and cons of such an design from the of view of the user of the library?
For instance:
from scipy.sparse.csgraph import dijkstra
versus:
from scipy.csgraph import dijkstra
or even an entirely flat design:
from scipy import dijkstra
Note:
- This question is specifically about Python, because idiomatic Python makes other tradeoffs than say idiomatic Java.
- I am talking about the user interface, not how you should structure your code as a library designer.