<div dir="ltr"><div class="gmail_quote">On Tue, Jun 19, 2012 at 12:41 PM, Simon Sapin <span dir="ltr"><<a href="mailto:simon.sapin@kozea.fr" target="_blank">simon.sapin@kozea.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Le 19/06/2012 09:52, anatoly techtonik a écrit :<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Here is one more problem - when module is executed as a script, it<br>
loses its __name__, which becomes equal to '__main__'.<br>
</blockquote>
<br></div>
PEP 395 "Qualified Names for Modules" tries to address this.<br>
<br>
<a href="http://www.python.org/dev/peps/pep-0395/" target="_blank">http://www.python.org/dev/<u></u>peps/pep-0395/</a><br>
<br></blockquote><div><br></div><div>I agree that python does not need any magic __main__ function. The __main__ boolean is streets ahead in readability though.</div><div><br></div><div>Yuval</div></div></div>