Nick Coghlan wrote:

> The existing "if __name__ == '__main__' idiom would be replaced by a simple 
> "if __main__:"

That sounds good.

> A new attribute in the sys module "main" would always reference the main 
> module of the application. The main module would also be stored in 
> sys.modules 
> under the name "sys.main",

Why not just __main__ as the alias name? Is there any need
to invent a new name for this?

> Files that are executed directly would have their __name__ attribute set to 
> "<main>".

Again, why not leave it as "__main__" in this case? And if
it must change, does it really have to be something that's
not a valid identifier and/or doesn't correspond to anything
in sys.modules?

--
Greg

_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to