keyword in package name.

MRAB google at
Sun Oct 19 16:17:03 CEST 2008

On Oct 19, 7:05 am, Abhishek Mishra <abhishekmish... at> wrote:
> Hello Everyone,
> 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.
> P.S. this would also be a problem for the iceland domains (tld = .is).
> TLDs:
> Python Keywords:
You could add a trailing underscore, ie "in_". This "fix" is done in
the poplib module where the POP3 class has a method called "pass_"
because "pass" is a reserved word.

More information about the Python-list mailing list