X-Received: by 10.66.97.39 with SMTP id dx7mr7006633pab.29.1416618437121; Fri, 21 Nov 2014 17:07:17 -0800 (PST) X-Received: by 10.140.94.150 with SMTP id g22mr139373qge.0.1416618437067; Fri, 21 Nov 2014 17:07:17 -0800 (PST) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!h15no5339586igd.0!news-out.google.com!w7ni319qay.0!nntp.google.com!s7no988385qap.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Fri, 21 Nov 2014 17:07:16 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=70.196.64.105; posting-account=h3aEwQoAAACiuqX-oR3gvCVFm8lLHoWj NNTP-Posting-Host: 70.196.64.105 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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2664ed2e-ec79-4cbf-908b-ce91aaa75d3d@googlegroups.com> Subject: Re: PyWart: "Python's import statement and the history of external dependencies" From: Rick Johnson Injection-Date: Sat, 22 Nov 2014 01:07:17 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.python:81261 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.