[Python-ideas] PEP for executing a module in a package containing relative imports
Steven Bethard
steven.bethard at gmail.com
Sat Apr 21 07:19:54 CEST 2007
On 4/20/07, Brett Cannon <brett at python.org> wrote:
> Exactly. Python 2.6 will still have __name__ set to '__main__', but
> also have __main__ set. Python 3.0 will not change __name__ at all.
That should be Python 3.0 will not change __main__ at all, right?
Because __name__ is going to change from being "__main__" in the main
module to being the actual module name in Python 3.0, right?
Assuming that's right, I think it was unclear to me that you wanted to
add __main__ to Python 2.x. Probably chainging:
First, a Py3K deprecation warning will be raised...
to:
First, each module will gain a __main__ attribute and a Py3K
deprecation warning will be raised...
would make the intent clearer.
Steve
--
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
--- Bucky Katt, Get Fuzzy
More information about the Python-ideas
mailing list