A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-June/066631.html below:

[Python-Dev] PEP 328 and PEP 338, redux

[Python-Dev] PEP 328 and PEP 338, reduxAahz aahz at pythoncraft.com
Tue Jun 27 18:40:52 CEST 2006
On Tue, Jun 27, 2006, Phillip J. Eby wrote:
> At 08:08 AM 6/27/2006 -0700, Guido van Rossum wrote:
>>
>>Bad idea IMO. The __name__ == "__main__" rule is so ingrained, you
>>don't want to mess with it.
> 
> Actually, maybe we *do* want to, for this usage.
> 
> Note that until Python 2.5, it was not possible to do "python -m 
> nested.module", so this change merely prevents *existing* modules from 
> being run this way -- when they could not have been before!
> 
> So, such modules would require a minor change to run under -m.  Is this 
> actually a problem, or is it a new feature?

Well, yes, considering that cd'ing to the module's dir and doing "python
module.py" will now fail.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"I saw `cout' being shifted "Hello world" times to the left and stopped
right there."  --Steve Gonedes
More information about the Python-Dev mailing list

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