On Tue, Nov 26, 2013 at 3:01 AM, Nick Coghlan <ncoghlan@gmail.com> wrote:
On 26 Nov 2013 10:00, "Mark Janssen" <dreamingforward@gmail.com> wrote:
The only other possibility not mentioned thus far is to have a main.py file and force python programs to start from it.
Looking for a __main__.py module (or submodule) is the way directory, zipfile and package execution work, so this style is already possible
today
for anyone that wants or needs it.
It also doesn't work so well for non-packages. :) That said, I like how __main__.py makes a clear separation between the package and its script form. As I said in my opening email, I think that distinction is very fuzzy for modules in general and bites both beginners and advanced users. For me anything that proposed replacing the current "if __name__ == '__main__'" idiom should help make the script/module separation more distinct. -eric