[SciPy-Dev] Question about subpackage/submodule API

Pauli Virtanen pav at iki.fi
Sat Feb 12 16:05:05 EST 2011


On Sat, 12 Feb 2011 14:12:44 -0600, Travis Oliphant wrote:
> The policy in the past has been that the stable API is only one level
> down from the scipy namespace.
> 
> So, developers should import the name from the top level namespace.
> 
> As a subpackage grows, I could see justification for one more level in
> the stable API --- e.g. scipy.signal.spectral.
>
> But, I would be opposed to an API that is deeper than that.

Agreed.

One wild idea to make this clearer could be to prefix all internal sub-
package names with the usual '_'. In the long run, it probably wouldn't 
be as bad as it initially sounds like.

For instance, `numpy._core`, `scipy.special._orthogonal`, 
`scipy.linalg._decomp` etc.

	Pauli




More information about the SciPy-Dev mailing list