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

Chris Angelico rosuav at gmail.com
Thu Dec 4 17:24:25 EST 2014


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



More information about the Python-list mailing list