[Python-Dev] Re: PEP 328 -- relative and multi-line import

Aahz aahz at pythoncraft.com
Mon Apr 12 12:55:59 EDT 2004


On Mon, Apr 12, 2004, Jeremy Hylton wrote:
> On Mon, 2004-04-12 at 10:06, Barry Warsaw wrote:
>>
>> Would that be any different than if modules of the subpackage add the
>> __future__ in them?  I'm envisioning semantics such that a __future__ in
>> an __init__.py was the same as if that __future__ was explicitly added
>> to every module (i.e. it's a convenience).

Right.  And my point is that there's at least one corner case where this
will have definite drawbacks.

> I think they belong in every module.  A future statement is a compiler
> gimmick and modules are compiled separately, so each module ought to
> have its own future statement.  If not, the compiler (and human reader)
> have no idea whether a future statement is in effect.  Obviously, the
> compiler and the reader could learn about some change to import
> semantics by studying context, but that's extra complexity I'd like to
> avoid (particular in the case of the compiler).

That's what I expected the reaction to be from others.  Barry, if you
want your change, lobby Guido.  ;-)
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Why is this newsgroup different from all other newsgroups?



More information about the Python-Dev mailing list