On Nov 30, 2007 3:59 PM, Greg Ewing <[EMAIL PROTECTED]> wrote:
> Terry Reedy wrote:
> > The only problem would be if someone put
> > the incantation into a non-main module named 'main.py', but the same is
> > true today of '__main__.py'.  And I would consider either a buggy practice.
>
> I often put the "real" main code into a separate module, so
> that it gets compiled to a .pyc, and sometimes I call that
> module "main.py". So this change would break a lot of my
> programs, and perhaps other people's as well.
>
> I think the situation with __main__ is different from __builtin__,
> because __builtin__ is an actual, specific module, whereas
> __main__ is a pseudo-module which stands in for a different thing
> in every Python program. So I'm in favour of keeping an
> __xxx__ name for it, to emphasise its magic nature. I'm much
> less likely to accidentally stomp on a magic name than a
> non-magic one.

Right. Rest assured, __main__ is not going to change.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to