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

Bill Janssen janssen at parc.com
Sat Apr 10 15:44:28 EDT 2004


> In addition to Andrew's excellent response, I want to point out that this
> only affects packages; most of the distributed code that I've seen tends
> to be in single modules.  It also only affects packages that rely on
> relative imports: as Barry points out, there's a significant set of
> developers that currently uses only absolute imports because of the
> tricky semantics for relative imports.

It would be interesting to have a survey.  You'd want to have usage
statistics in there, as well.  That is, xx% of packages use relative
imports; these packages account for xx% of downloads.

> Also, by the time imports start to fail, what is currently two or three
> year-old code will be five or six years old.  Anyone who is writing code
> now will be aware of this issue and should be able to future-proof their
> code if they want.  Nobody should expect to download code that's five or
> six years old and have it just work.

I expressed myself poorly; I was thinking of packages written in the
future, so they'd still be two or three years old.

"Anyone who is writing code now will be aware..." is an unfortunate
example of ivory-tower thinking.  Many people who are writing code
using a wonderful tool like Python have better things to do than keep
up with the vagaries of Python releases.  They rightly feel that if
they learned Python with 2.2, what they know should be pretty stable
at least until Python 3.0 comes out.  They don't think that in a minor
release, Python import semantics will change out from under them.
Every few years, when they find some time, they will check out some of
the new features, like generators, that the developers find so
delightful.  But in between those times, they won't be clueful.

Most Python developers may be Python users, but most Python users are
not Python developers.

> Nobody should expect to download code that's five or
> six years old and have it just work.

One of the attractive features of Python has always been that
5-year-old code *does* just work.  That's because the design was
largely right from the start, and the designers have been careful to
keep things backwards-compatible.

> Do you still think this is a "user-hostile" attitude?  If yes, you'll
> need to make your case in more detail.

I think users unfamiliar with the Python development process will
perceive Python as being hostile to their concerns if things like this
keep happening.  I wouldn't attribute any hostility to the developers;
it's just a mistake.

Bill



More information about the Python-Dev mailing list