Import bug: Module executed twice when imported!

Michael Abbott michael at araneidae.co.uk.invalid
Fri Jun 30 14:13:00 EDT 2006


Bump

In article <michael-3B486D.22521428062006 at europe.isp.giganews.com>,
 Michael Abbott <michael at araneidae.co.uk.invalid> wrote:

> --- test.py ---
> import imptest
> execfile('subtest.py', dict(__name__ = 'subtest.py'))
> --- imptest.py ---
> print 'Imptest imported'
> --- subtest.py ---
> import imptest
> ---
> 
>    $ python test.py
>    Imptest imported
>    Imptest imported
>    $

I claim this as an unreported (and highly obscure) Python bug.



More information about the Python-list mailing list