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

Michael Hudson mwh at python.net
Sun Apr 11 06:19:56 EDT 2004

Bill Janssen <janssen at parc.com> writes:

> I really wish I'd been paying more attention to 328, which I've just
> read.  This proposal seems to break lots and lots and lots of existing
> code.

Lots of *your* code, maybe...  I think you might be one of the few
people who embraced packages as soon as they were available.

> Maybe I'm reading it wrong.
> I've written many, many packages that use the form
>      import foo
> where "foo" is a sibling module in the package.  Or
>       from foo import bar
> where, again, foo is a sibling to the current module. 

Nevertheless, do you agree or not that it was a mistake that relative
and absolute imports are spelt the same?  I you do, then surely the
longer we leave it, the worse the problem gets...


> I was thinking (some months ago) that y'all would come up with an
> absolute form instead, something like

Then you really haven't been paying attention!  Pretty much *everyone*
who has contributed to the discussion, and presumably plenty who
haven't (like me), has assumed that absolute imports are more common
and should the default (certainly, all the imports in my own code are


  > With Python you can start a thread, but you can't stop it.  Sorry.
  > You'll have to wait until reaches the end of execution.
  So, just the same as c.l.py, then?
                       -- Cliff Wells & Steve Holden, comp.lang.python

More information about the Python-Dev mailing list