[Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages (original) (raw)

Paul Moore p.f.moore at gmail.com
Mon Jan 7 23:38:04 CET 2008


On 07/01/2008, Raymond Hettinger <python at rcn.com> wrote:

It is my hope that there will be a great deal of restraint in the effort to group modules into packages in Py3.0.

+1

The best existing indicator we have is the organization of the docs for the standard library. I, for one, have a hell of a difficult time finding modules via the "organized" table of contents in the Library Reference. Instead, I always go the the Global Module Index where the somewhat flat namespace makes it easy to go directly to the module of interest. I'm curious whether the other developers have had the same experience -- if so, then it is a bad omen for over-organizing the standard library.

Yes, I have the same problem. I had not considered this, but I agree that it's the best indication available of how a hierarchical organisation might end up, and what issues there might be.

From the Zen of Python: "Flat is better than nested".

There are handful of groupings that are obvious (i.e. html and socket modules going into an internet package).

One man's obvious is another man's confusing. I'd stick to Guido's principle, that packages should only be used where they simplify sub-names. And even there, use restraint.

I know I was earlier tending more towards the side of having more packages. I've been convinced otherwise.

Paul.



More information about the Python-Dev mailing list