[Web-SIG] OT: dotted names (Was: Re: A Python Web Application Package and Format)

Fred Drake fdrake at acm.org
Fri Apr 15 22:11:03 CEST 2011

On Fri, Apr 15, 2011 at 1:32 PM, Éric Araujo <merwok at netwok.org> wrote:
> As an aside, I wonder why people use dot+colon notation instead of just
> dots to reference callables.  In distutils2 for example we resolve
> dotted names to find command classes, command hooks and compilers.

I advocated using the just-dotted notation.  These references are found in
configurations, usually constructed users of the components rather than
implementors of the components.  This is different than for entry points,
where the entry point specification uses module:object, but is provided by
the package maintainer.

These end users don't really care if the object identified is a class or
function in module, a nested attribute on a class, or anything else, so
long as it does what it's advertised to do.  By not pushing implementation
details into the identifier, the package maintainer is free to change the
implementation in more ways, without creating backward incompatibility.

Jim's note about having an expression after the colon is interesting;
not sure if that's a helpful case for packaging's use or not.


Fred L. Drake, Jr.    <fdrake at acm.org>
"Give me the luxuries of life and I will willingly do without the necessities."
   --Frank Lloyd Wright

More information about the Web-SIG mailing list