Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71945
| Date | 2014-05-23 16:52 -0600 |
|---|---|
| From | Michael Torrie <torriem@gmail.com> |
| Subject | Re: All-numeric script names and import |
| References | (2 earlier) <CAPTjJmrfFJYk0P14tZiakWE4uFMSFaQ8pujOuNG49qnUOD-b_A@mail.gmail.com> <lln2kj$3op$1@ger.gmane.org> <CAPTjJmqUZ5w1GOQQ1g2Rd5wb_Q3Hy0fHgZkJPV25zMAx_dUmOQ@mail.gmail.com> <lln40s$mv5$1@ger.gmane.org> <CAPTjJmrbgt6jSZMipQSvC5htBLvQVXh0h4Waw0HpPzeWd27gOw@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10256.1400885551.18130.python-list@python.org> (permalink) |
On 05/23/2014 03:28 AM, Chris Angelico wrote: > On Fri, May 23, 2014 at 7:22 PM, Wolfgang Maier > <wolfgang.maier@biologie.uni-freiburg.de> 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.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
All-numeric script names and import Chris Angelico <rosuav@gmail.com> - 2014-05-21 23:46 +1000
Re: All-numeric script names and import Mark H Harris <harrismh777@gmail.com> - 2014-05-21 09:24 -0500
Re: All-numeric script names and import Chris Angelico <rosuav@gmail.com> - 2014-05-22 00:40 +1000
Re: All-numeric script names and import Mark H Harris <harrismh777@gmail.com> - 2014-05-21 09:24 -0500
Re: All-numeric script names and import Rustom Mody <rustompmody@gmail.com> - 2014-05-22 19:08 -0700
Re: All-numeric script names and import Chris Angelico <rosuav@gmail.com> - 2014-05-23 13:26 +1000
Re: All-numeric script names and import Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2014-05-23 10:58 +0200
Re: All-numeric script names and import Chris Angelico <rosuav@gmail.com> - 2014-05-23 19:02 +1000
Re: All-numeric script names and import Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2014-05-23 11:22 +0200
Re: All-numeric script names and import Chris Angelico <rosuav@gmail.com> - 2014-05-23 19:28 +1000
Re: All-numeric script names and import Michael Torrie <torriem@gmail.com> - 2014-05-23 16:52 -0600
csiph-web