Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!hq-usenetpeers.eweka.nl!hq-usenetpeers.eweka.nl!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.06; '21,': 0.07; 'explicit': 0.07; 'sys': 0.07; '22,': 0.09; 'friday,': 0.09; 'method,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'chris,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'lying.': 0.16; 'path.': 0.16; 'resolutions,': 0.16; 'subject:dependencies': 0.16; 'subject:import': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'module': 0.19; 'mechanism': 0.19; 'work,': 0.20; 'import': 0.22; 'proposed': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'posts': 0.26; 'suggested': 0.26; 'header:In-Reply-To:1': 0.27; 'specifically': 0.29; 'chris': 0.29; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'reply.': 0.31; 'file': 0.32; 'cases': 0.33; 'subject:the': 0.34; 'something': 0.35; 'johnson': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'words,': 0.36; 'method': 0.36; 'should': 0.36; 'nov': 0.38; 'pm,': 0.38; 'explain': 0.39; 'realize': 0.39; 'use.': 0.39; 'either': 0.39; 'read': 0.60; 'subject:"': 0.60; 'most': 0.60; 'new': 0.61; 'advanced': 0.63; 'name': 0.63; 'more': 0.64; 'taking': 0.65; 'techniques': 0.66; 'between': 0.67; "today's": 0.70; 'day': 0.76; 'heavy': 0.81; 'itself?': 0.84; 'situations,': 0.84; 'subject:history': 0.84; 'to:none': 0.92; 'rick': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=YmsU4A86oymZNx4ahKb3Ly83C3oNy2sqEzrBwdb2j5A=; b=uG55d82u3LL5CORp+owoflTLCGjAmz0dgtMH4uKWVU7cilj9UyikjSTJft4Rl1prxf AcLHeq/cyab3IXKJmr+6sNA46gtjPZBdjZM3o9UtEGFvMxO9hCWLBCL0agNny/jGuZrW w7KLKaDncovVK4Qt7oczCX+V4aH15Cn/DDZ6IXUeNVvPS/TN7jUN1wrxyxYwXiXFxejP il97PFM9+LZE6qmWTlnLIB7j1H3LFFdaItx+FATrwyMS5fK/fPKVspCtD4k1Mc/O+/7M a0pziKGaEHaghwWaZeHj/hxIWawfNOZtD2aROFFfR5f94AxaKzI5uuIeNjMrnZJYi2Fn hMhA== MIME-Version: 1.0 X-Received: by 10.50.171.193 with SMTP id aw1mr1430075igc.2.1416623797018; Fri, 21 Nov 2014 18:36:37 -0800 (PST) In-Reply-To: <2664ed2e-ec79-4cbf-908b-ce91aaa75d3d@googlegroups.com> References: <066c46c8-a04d-4489-b15a-b603c1b1818b@googlegroups.com> <8661e407-4472-4208-97c2-f666f6502c67@googlegroups.com> <0bbe1c60-2b29-40f6-96e1-ac777f0c276f@googlegroups.com> <08867178-abb6-4703-9ac5-2a53acb5d227@googlegroups.com> <2664ed2e-ec79-4cbf-908b-ce91aaa75d3d@googlegroups.com> Date: Sat, 22 Nov 2014 13:36:36 +1100 Subject: Re: PyWart: "Python's import statement and the history of external dependencies" From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416623800 news.xs4all.nl 2849 [2001:888:2000:d::a6]:44663 X-Complaints-To: abuse@xs4all.nl X-Received-Body-CRC: 2576115556 X-Received-Bytes: 5719 Xref: csiph.com comp.lang.python:81263 On Sat, Nov 22, 2014 at 12:07 PM, Rick Johnson wrote: > On Friday, November 21, 2014 5:59:44 PM UTC-6, Chris Angelico wrote: >> On Sat, Nov 22, 2014 at 10:21 AM, Rick Johnson >> wrote: >> > 1. Use the historical "implicit import" mechanism for most day >> > to day imports, and let Python do all the heavy lifting. >> > >> > 2. Use the new "explicit import" mechanism for advanced name >> > resolutions, but realize that since you are now taking >> > control of import, so you must do more work, and you must be >> > "exhaustively explicit" about *where* Python searches. >> >> In other words, what you want is: >> >> # today's method, import based on search path >> import sys >> # new explicit path method >> import '/usr/local/lib/python3.5/lib-dynload/math.cpython-35m.so' >> >> [...] >> >> There are a VERY VERY few cases where you really do want >> to import a module from a specific file path. For those >> situations, there are already techniques you can use. Why >> change the behaviour of import itself? > > Chris, either take the time to read and understand my posts > *FULLY*, or don't bother to reply. I have in no way > suggested that we import via "filepaths". Stop lying. Okay. Explain to me the difference between your proposed "explicit import" mechanism, where you specifically name the path where Python should import something from, and "importing via filepaths". ChrisA