On Nov 30, 2007 3:59 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> 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/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4