keyword in package name.

Terry Reedy tjreedy at udel.edu
Sun Oct 19 11:10:34 CEST 2008


Abhishek Mishra 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.

india = __import__('in')
will work
while you must alias in Python, you can have what you want on disk




More information about the Python-list mailing list