[Python-Dev] On breaking modules into packages

Ben Finney ben+python at benfinney.id.au
Wed Nov 3 01:06:56 CET 2010


Raymond Hettinger <raymond.hettinger at gmail.com> writes:
> >> Are we permanently locked into the exact ten filenames that are
> >> currently used: utils, suite, loader, case, result, main, signals,
> >> etc?
[…]
> Sounds like a decision to split a module into a package is a big
> commitment. Each of the individual file names becomes a permanent part
> of the API. Even future additional splits are precluded because it
> might break someones dotted import (i.e. not a single function can be
> moved between those files -- once in unittest.utils, alway in
> unittest.utils).

Is this a case where it would be better if the package names had the
leading underscore: ‘_utils’, ‘_suite’, etc.?
Does the convention on single-leading-underscore identifiers as “don't
rely on this name staying the same in future versions” hold for package
names?
-- 
 \ “Alternative explanations are always welcome in science, if |
 `\ they are better and explain more. Alternative explanations that |
_o__) explain nothing are not welcome.” —Victor J. Stenger, 2001年11月05日 |
Ben Finney


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /