[Python-ideas] Prevent importing yourself?

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Jan 29 18:09:30 EST 2016
Ned Batchelder wrote:
> Could we make this a more obvious failure?  Is there ever a valid reason 
> for a file to import itself?

I've done it occasionally, but only when doing something
very unusual, and I probably wouldn't mind having to
pull it out of sys.modules in cases like that.

-- 
Greg


More information about the Python-ideas mailing list