keyword in package name.

Diez B. Roggisch deets at nospam.web.de
Sun Oct 19 07:53:38 EDT 2008


Abhishek Mishra schrieb:
> On Oct 19, 2:06 pm, Marc 'BlackJack' Rintsch <bj_... at gmx.net> wrote:
>> `com_spam.app1`!?  I would even recommend this with domains that don't
>> clash with keywords because if several people start to use this package
>> name convention you will get name clashes at package level.  Say there
>> are two vendors with a `com` TLD, how do you install their packages?  
>> Into the same `com/` subdirectory?  The `__init__.py` of which vendor
>> should live at the `com/` directory level?  If you install them into two
>> different directories but want to import modules from both vendors -- how?
>>
>> Ciao,
>>         Marc 'BlackJack' Rintsch
> 
> Ah, you have opened my eyes.
> I should have asked myself before why I did not face such a clash.
> (because no-one uses this convention!)
> 
> I guess the way to go is not use the tld, but just a unique company/
> product name.

I personally tend to mix the approaches. Using setuptools, you can 
declare so-called "namespace-packages".

I use one of these for all my projects at work. It is derived from the 
companyname, and thus is unique. And all sub-packages for the various 
projects can have names that describe them and sometimes would clash 
with other projects (e.g. devtools, which also is a TurboGears-package)

Diez



More information about the Python-list mailing list