[Distutils] [Python-Dev] shal we redefine "module" and "package"?
glyph at divmod.com
glyph at divmod.com
Thu May 1 01:11:46 CEST 2008
On 10:53 pm, steve at holdenweb.com wrote:
>zooko wrote:
>>Unfortunately these answers aren't quite right. A "package" is
>>actually a directory containing an __init__.py file, and a
>>distribution is actually what you think of when you say "package" -- a
>>reusable package of Python code that you can, for example, get from
>>the Python package index.
The fact that the Python "package" index is a place where you get
"distributions" does seem a bit weird to me, but this is not necessarily
a problem that can be fixed. Ambiguity is part of human language.
Perhaps suggest transliterations of these terms for talking about python
in lojban? :)
>>1. A "module" shall henceforth be the name for either a foo.py file
>>(a single-file module), or a directory with an __init__.py in it (a
>>directory module).
I have a less disruptive counterproposal. How about just starting to
refer to directories (or "folders", or zip entries) with '__init__.py'
in them as "package modules"? A package is-a module anyway.
>>2. A "package" shall henceforth be the name of the thing that is
>>currently called a "distribution".
I belive a multi-word term here would be similarly more memorable and
precise. A "package distribution" would include the more familiar term
while still being specific, consistent with the old terminology, and
correct. Using a qualifying word is probably a good idea in this
context anyway. I usually say "debian package", "RPM", "MSI", or
"tarball" unless I'm specifically talking about "packages for your
platform", almost always in the phrase, "please do not use distutils to
do a system install of Twisted, use the specific package for your
platform".
>-1
I do, however, agree with Steve emphatically on your original proposal.
Changing the terminology now will make billions upon billions of Python
web pages, modules (c.f.
twisted.python.modules.PythonModule.isPackage()) documents, and
searchable message archives obsolete, not to mention that 90% of the
community will probably ignore you and use the old terminology anyway,
creating more confusion than it eliminates.
More information about the Distutils-SIG
mailing list