[Python-Dev] Thoughts on stdlib evolvement

Skip Montanaro skip at pobox.com
Mon Jun 6 20:38:36 CEST 2005



    Reinhold> - Flat namespace: Should we tend to a more hierarchic library
    Reinhold>   (e.g.  inet.url, inet.http, inet.nntp)? This would increase
    Reinhold>   clarity when searching for a module.

We've talked about this before.  The main technical challenge seems to be
backward compatibility.  You need to support both flat ("import urllib") and
packaged namespaces ("from www import urllib"), possibly within the same
application.  That is, postulating a www package, if I execute

    import urllib
    from www.urllib import urlopen

the module-level code should only be executed once, and

    urlopen == urllib.urlopen

should evaluate to True.

    Reinhold> - 3rd party modules: There are many superb modules out there,
    Reinhold>   some of which really do have a "standard"
    Reinhold>   character. Examples include PIL, numarray, ElementTree,
    Reinhold>   [wxPython - I know this is a hairy issue],

I think a good first step would be deciding on a package hierarchy.  Third
party packages could plug in wherever they fit best.

Skip


More information about the Python-Dev mailing list