keyword in package name.
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Sun Oct 19 05:06:10 EDT 2008
On Sat, 18 Oct 2008 23:05:38 -0700, Abhishek Mishra wrote:
> I have the habit of using domain names (of either the application or
> company) in reverse in package names.
>
> for e.g. com.spam.app1
>
> I've recently started a project for an indian domain (tld = .in), which
> leads to a package name like
>
> in.spam.app1
>
> This causes a syntax error, as "in" is a keyword. I understand that this
> is an unfortunate "feature", but has anyone faced this problem before,
> and is there a possible workaround.
`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
More information about the Python-list
mailing list