Excellent redirect of original proposal: +10

 

From: André Roberge <andre.roberge@gmail.com>
[snip]

 

As a goal of making it even more obvious what the (new) idiom mans, I would suggest a variable named __imported__ with the opposite value to what is proposed.

 

Thus, 

 

if not __imported__:

 

would behave the same as the proposed

 

if __main__:

 

 

André