Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.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.026 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'subject:Python': 0.06; '21,': 0.07; 'explicit': 0.07; 'sys': 0.07; 'friday,': 0.09; 'method,': 0.09; 'posted': 0.15; 'chris,': 0.16; 'lying.': 0.16; 'path.': 0.16; 'skip:[ 40': 0.16; 'subject:dependencies': 0.16; 'subject:import': 0.16; 'wrote:': 0.18; 'module': 0.19; 'import': 0.22; 'math': 0.24; 'posts': 0.26; 'suggested': 0.26; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; 'reply.': 0.31; 'file': 0.32; 'cases': 0.33; 'fri,': 0.33; 'comment': 0.34; 'skip:_ 10': 0.34; 'subject:the': 0.34; 'johnson': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'words,': 0.36; 'method': 0.36; 'nov': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'little': 0.38; 'use.': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'read': 0.60; 'subject:"': 0.60; 'new': 0.61; 'skip:n 10': 0.64; 'techniques': 0.66; 'between': 0.67; 'of:': 0.68; "today's": 0.70; 'itself?': 0.84; 'situations,': 0.84; 'subject:history': 0.84; '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:from:date:message-id:subject:to :content-type; bh=rL30QdkLuvF0gcL5UZf7yQW1HybJDLcn9Elo7eyMKug=; b=qxOG4YQ+xvCw8x2a4EDz7NIGwappTmbzDQkX8t3VZYg77s5NBWDprLenLu70UqQWRn XvB9codeEat7UIfoYefgbKt3Ofxkp3wO5hxwg4L0a7+wDfbccH5EqbhuV2jW8chO+5Zw s5ZGiPuA90/nG9Q0duaD4h5utRfCTxmbQ5Y0au/3XFiWu41+mnogVAnrNYUKSe4dTwQG px80RmmnTlfs3eQyv5dG0FyZ9j4nnF5LTWKPKGWudeIOsADQdUBYVzz+DvvC4JZ6nxAZ 1CQJRDcEAPAXsZA+OyKzlJ+S2uN45jouGjOTgnCuELtqe+cxG/cnWzYI0aKY+Z57545w NENA== X-Received: by 10.66.191.135 with SMTP id gy7mr14698652pac.95.1416648470937; Sat, 22 Nov 2014 01:27:50 -0800 (PST) MIME-Version: 1.0 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> From: Ian Kelly Date: Sat, 22 Nov 2014 02:27:10 -0700 Subject: Re: PyWart: "Python's import statement and the history of external dependencies" To: Python 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: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416648474 news.xs4all.nl 2902 [2001:888:2000:d::a6]:39820 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:81281 On Fri, Nov 21, 2014 at 6:07 PM, Rick Johnson wrote: > On Friday, November 21, 2014 5:59:44 PM UTC-6, Chris Angelico wrote: >> 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. I see very little substantive difference between what Chris posted and your suggestion of: __search_path__ = ['/usr/local/lib/python3.5/lib-dynload'] import math His comment about non-portability stands.