opensubscriber
   Find in this group all groups
 
Unknown more information…

w : web-sig@python.org 16 April 2011 • 4:11AM -0400

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

REPLY TO AUTHOR
 
REPLY TO GROUP




On Fri, Apr 15, 2011 at 1:32 PM, Éric Araujo <merwok@netw...> 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

--
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
_______________________________________________
Web-SIG mailing list
Web-SIG@pyth...
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: http://mail.python.org/mailman/options/web-sig/subscriber%40opensubscriber.com

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.