On Mon, Oct 22, 2012 at 7:54 AM, Devin Jeanpierre <jeanpierr...@gmail.com> wrote: > > The second one is used if your importable modules are also scripts > that can be executed. > > That's a bad idea, because it results in the same source file being > executed twice, producing distinct classes that break typechecking.
Here's an exception to the above. On Windows, multiprocessing requires you to gate the setup in "__main__" since the module is re-imported in each new process (win32 doesn't fork). _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor