Path: csiph.com!usenet.pasdenom.info!gegeweb.org!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4a.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; "subject:' ": 0.07; '3.0,': 0.09; 'subject:modules': 0.09; 'subject:question': 0.10; 'cc:addr :python-list': 0.11; 'python': 0.11; '2.7': 0.14; '"in': 0.16; '__future__': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hmm.': 0.16; 'imports': 0.16; 'otoh,': 0.16; 'statement.': 0.16; 'sure.': 0.16; 'wrote:': 0.18; 'module': 0.19; 'seems': 0.21; 'saying': 0.22; 'cc:addr:python.org': 0.22; 'interpret': 0.24; 'fine': 0.24; 'cc:2**0': 0.24; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'dec': 0.30; 'relative': 0.30; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'implicit': 0.31; 'fri,': 0.33; 'subject:from': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'transition': 0.36; 'how': 0.40; 'even': 0.60; 'read': 0.60; "you're": 0.61; 'became': 0.64; 'between': 0.67; 'believe': 0.68; 'to:none': 0.92 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=hOAXHKAnJrWKWkWr4XDm7pHkUHfky66+tbb5YIdYlTY=; b=vE010naw7IJpouBZE2rnUTkgSnhNy5E4DyQeFZXcuERPxh9UnKeENM2delaULkYnJH pM5hEkuMl764Eboc30erxVWuKLLR6c/4tUEko7AewVylvWENTaZOO7BPo1SgO9eMca0V AhvtyOIRNHqID8GoWowF0+r8E6hiJpcepdjaQ4n/Jqvugjsn0rF6bJ8kDcAGFWiYfuty C9oqW0Q7SV5VfXO1g2kqVxWxCCPTeloLcDDUET1c/aEPyKU37G99bfJvfetP7TMkFbTY qBaakkEX6SGWQL2ohxoPYAWyV/v9ybTIDVnqwYLjhjxU+f7sB0VSkCsOQX9crFYrU/Ca +bIw== MIME-Version: 1.0 X-Received: by 10.107.134.39 with SMTP id i39mr11826585iod.53.1417731865851; Thu, 04 Dec 2014 14:24:25 -0800 (PST) In-Reply-To: References: <2047880662.4611734.1417714597653.JavaMail.root@sequans.com> Date: Fri, 5 Dec 2014 09:24:25 +1100 Subject: Re: Style question: Importing modules from packages - 'from' vs 'as' 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1417731875 news.xs4all.nl 2848 [2001:888:2000:d::a6]:45953 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:81954 On Fri, Dec 5, 2014 at 9:10 AM, Wolfgang Maier wrote: > which I read as there has been a stepwise transition between 2.5 and 2.7 so > that 2.7 now behaves like Python 3 even without the __future__ statement. > OTOH, I believe you, of course, if you're saying implicit relative imports > are working just fine in 2.7, but then how to interpret the "In Python 2.7 > the __future__ statement is not needed." above ? Hmm. To be honest, I'm not sure. The Python 2.7 __future__ module claims that absolute_import became standard in 3.0, not 2.7, which seems to conflict with what you're seeing. ChrisA