What is the purpose of __name__?
<p>What does <code>__name__</code> do? I have only seen it paired with <code>__main__</code> and nothing else.</p>

<p>I know that the classic <code>if __name__ == __main__:</code> defines the behavior when acting as a package vs running as stand-alone.</p>

<p>However what other usages are there for <code>__name__</code>?</p>