>
> This is in general dependent on what happens when one imports a module
> though right? I think for sys this is a non-issue but there are packages
> that have classes and such that keep track of per import module states
> where an import could do more than just add reference counts to a module.
>
For CPython - unless there is some external import hook stuff going on -
this does not happen.  In CPython by default, every module is only executed
the first time it is imported in the process. It is then shoved into the
sys.modules dictionary.  Subsequent imports simply look up the module from
this cache.  I don't think a module has a way of knowing that is has been
re-imported.  No code is executed on re-import so it couldn't do anything
even if it wanted.

Like Eminem in 8-mile, it only gets one shot.