Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81954

Re: Style question: Importing modules from packages - 'from' vs 'as'

References (1 earlier) <2047880662.4611734.1417714597653.JavaMail.root@sequans.com> <CAPTjJmpgM2n=AdY+8gZ40gqe1S2zfD83Ui-f5SngRYLA3jMtCQ@mail.gmail.com> <m5qhqd$bts$1@ger.gmane.org> <CAPTjJmomvKMBxr0Sq=FtcfDVuUXU9gX6vbzjFdp2VEEk5Qrq1g@mail.gmail.com> <m5qm45$h75$1@ger.gmane.org>
Date 2014-12-05 09:24 +1100
Subject Re: Style question: Importing modules from packages - 'from' vs 'as'
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.16592.1417731875.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Dec 5, 2014 at 9:10 AM, Wolfgang Maier
<wolfgang.maier@biologie.uni-freiburg.de> 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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Style question: Importing modules from packages - 'from' vs 'as' Chris Angelico <rosuav@gmail.com> - 2014-12-05 09:24 +1100

csiph-web