[Python-Dev] pep-3108.txt

Brett Cannon brett at python.org
Wed Jan 3 00:09:44 CET 2007


On 1/2/07, M.-A. Lemburg <mal at egenix.com> wrote:
>
> On 2007-01-02 23:54, Brett Cannon wrote:
> > On 1/2/07, M.-A. Lemburg <mal at egenix.com> wrote:
> >>
> >> On 2007-01-02 01:02, brett.cannon wrote:
> >> > Author: brett.cannon
> >> > Date: Tue Jan  2 01:02:41 2007
> >> > New Revision: 53204
> >> >
> >> > Added:
> >> >    peps/trunk/pep-3108.txt   (contents, props changed)
> >> > Modified:
> >> >    peps/trunk/pep-0000.txt
> >> > Log:
> >> > Add PEP 3108: Standard Library Reorganization.
> >> >
> >> >...
> >> >
> >> > +Open Issues
> >> > +===========
> >> > +
> >> > +Consolidate dependent modules together into a single module or
> >> package?
> >> > ...
> >> > +Consolidate certain modules with similar themes together in a
> package?
> >> >
> +----------------------------------------------------------------------
> >> > ...
> >>
> >> If you do follow this route, please take the chance to place
> >> the whole Python stdlib under a single package. That way we'll
> >> avoid name clashes with existing packages and modules now and
> >> in the future.
> >
> >
> > That has been suggested before (including by me) and Guido has always
> shot
> > it down.  That's why I left it out of this proposal.
>
> Even if it is shot down again, it still deserves to be documented
> together with the reasons for being shot down.


Aw, but that means I have to go find why Guido didn't like it.  =)  But yes,
it should be either an open issue or rejected idea.

This is a one-in-a-lifetime chance, so it would be sad if it were
> not taken into account.
>
> The extra effort would be minimal - the renaming would have to be
> done using a script anyway and adding an extra 'from py import '
> prefix to the modules wouldn't really make the renaming more
> complicated ;-)


=)

> Together with absolute imports this also improves the readability
> >> of modules since it becomes immediately clear where the imported code
> >> is coming from.
> >>
> >> Note that as side-effect of this it becomes a lot harder to manipulate
> >> PYTHONPATH to trick Python into loading a standard module from a
> >> non-standard location, improving security and robustness of the
> >> Python installations.


Good point.  Could actually have the py namespace be special and use a
separate path list (e.g., sys.library_path) for that specific namespace.

-Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20070102/9c876504/attachment.html 


More information about the Python-Dev mailing list