[Python-Dev] Re: PEP-0273 (zip imports) needs to be finished off

Paul Moore pf_moore at yahoo.co.uk
Fri Aug 27 22:12:04 CEST 2004


Anthony Baxter <anthony at interlink.com.au> writes:

> I just noticed that PEP-0273 is not yet up to date. As the
> code's been in there since 2.3, it'd be a shame if we had to
> rip it out of 2.4a3 for lack of a current PEP <wink>

I'm not sure how (directly) relevant PEP 273 is any more. It
documented Jim Ahlstrom's approach, which was superseded by PEP 302's
import hooks, and the zipimport module that uses them.

I believe that PEP 302 is more or less up to date (there is
discussion of a "Phase 2" rationalisation in the PEP, which hasn't
been implemented, but IIRC that is mainly an internal detail and
doesn't affect the user-visible interface). I'll do a quick check of
the PEP against reality, but if there are mismatches, I can't offer
to fix them (Just was the coding wizard, I just wrote some of the
blurb).

There needs to be some documentation of the zipimport module,
certainly. I'm not sure if that should be in PEP 273 (zipimport is
acknowledged in that PEP, but as a competitor rather than an
implementation), in a separate PEP, or as a part of PEP 203 (with PEP
273 marked as rejected in the latter 2 cases). Personally, I wouldn't
feel comfortable modifying PEP 273 (it would be more or less a
complete rewrite) without Jim's agreement.

In practice, my preference would be to write a section for the
documentation covering all of this, and just put a prominent pointer
at the top of PEP 273 - something like "A variation on this proposal
was implemented in Python 2.3. For details see section XXX of the
documentation".

But where should this go? Even packages aren't too well documented
(see the "XXX Can't be bothered to spell this out" comment at the end
of section 6.12 of the language reference). Would a new section
6.12.2 "Import Semantics" be appropriate? Hmm, that would be my
preference. I'll see if I can work up a documentation patch...

Always-promising-more-than-I-can-deliver-ly y'rs
Paul.
-- 
The brain is a wonderful organ. It starts working the moment you get
up in the morning and does not stop until you get into the office. --
Robert Frost



More information about the Python-Dev mailing list