[Distutils] Adding entry points into Distutils ?

Tres Seaver tseaver at palladion.com
Wed May 6 20:32:29 CEST 2009

Hash: SHA1

Hanno Schlichting wrote:
> Doug Hellmann wrote:
>> On May 6, 2009, at 1:46 PM, P.J. Eby wrote:
>>> At 10:59 AM 5/6/2009 -0400, Doug Hellmann wrote:
>>>> On May 5, 2009, at 10:50 PM, P.J. Eby wrote:
>>>>> At 12:03 PM 5/6/2009 +1000, Ben Finney wrote:
>>>>>> I don't see any advantage, in the context of this discussion, to
>>>>>> having an additional, incompatible naming for full-path-to-a-class.
>>>>> Setuptools doesn't limit an entry point to being a class, function,
>>>>> or other top-level name within a module.  It can be a method of a
>>>>> class, or an attribute of an attribute.  The ':' removes any
>>>>> ambiguity as to which part of the name is the module, and which
>>>>> parts are attributes within that module.
>>>> Is that level of complexity useful in practice?  I can understand how
>>>> it came to be implemented, but is it actually used by any projects?
>>> I use it; I'm not sure who else does.
>>> The particular use case I have (and that's most likely to be shared)
>>> is that the calling app or framework wants a callable or function, but
>>> the providing app or library implements that callable as a classmethod
>>> for convenience.
>> That's pretty much what I expected.  It feels a little messy to have
>> plugins exposing "internals" like that but not so much so that I propose
>> we don't allow it. The ":" syntax seems like the right way to go.
> I'd be tempted to call this an edge-case. You should be able to expose
> the internal detail you'd need via a module scope alias for the
> particular case. That seems easier than providing a whole new notion.

I'm actually a big fan of the ':', because it makes explicit the
difference between the "import" and the "named thing", even for
module-scoped names.

- --
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the Distutils-SIG mailing list