Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.144 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.72; '*S*': 0.01; 'alias': 0.09; 'subject:script': 0.09; 'apache': 0.15; '23,': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'subject:import': 0.16; 'appropriate': 0.16; 'wrote:': 0.18; 'module': 0.19; 'import': 0.22; 'header:User-Agent:1': 0.23; 'propose': 0.24; 'fine': 0.24; 'define': 0.26; 'header:In-Reply- To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'see,': 0.30; 'go.': 0.31; 'fri,': 0.33; 'could': 0.34; "can't": 0.35; 'something': 0.35; 'should': 0.36; 'being': 0.38; 'message-id:@gmail.com': 0.38; 'mapping': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'dangerous': 0.60; 'new': 0.61; 'simply': 0.61; "you're": 0.61; 'happen': 0.63; 'more': 0.64; 'results': 0.69; 'devastating': 0.84; 'proposal.': 0.84; 'subject:All': 0.84; 'do:': 0.91; 'zealand': 0.91; 'imagine': 0.93 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Fri, 23 May 2014 16:52:17 -0600 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131118 Thunderbird/17.0.11 MIME-Version: 1.0 To: python-list@python.org Subject: Re: All-numeric script names and import References: <1714fbce-827f-4ba5-853c-f2f934a75466@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1400885551 news.xs4all.nl 2882 [2001:888:2000:d::a6]:59043 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:71945 On 05/23/2014 03:28 AM, Chris Angelico wrote: > On Fri, May 23, 2014 at 7:22 PM, Wolfgang Maier > wrote: >> I see, so what you should propose then is a change to import, so that when >> it can't find a module it will try to import an alternative that's >> pronounced the same way. Then you could simply do: >> >> import one >> >> and you're fine :) > > This strikes me as a very dangerous proposal. Imagine what would > happen when you try to "import chip" in New Zealand and it goes out > looking for "chup.py". Or the devastating results of "yes.py" and > "no.py" being indistinguishable on politicians' builds of Python... If you use a proper web framework, then you can define your urls to be anything you want. Just set up the appropriate mapping and away you go. Furthermore you can use apache directives to alias /1/ to something more importable.