[Python-Dev] Autoloading? (Making Queue.Queue easier to use)

john.m.camara@comcast.net john.m.camara at comcast.net
Wed Oct 12 13:03:58 CEST 2005


Greg Ewing wrote:

> 
> Guido van Rossum wrote:
> 
> > I see no need. Code that *doesn't* need Queue but does use threading
> > shouldn't have to pay for loading Queue.py.
> 
> However, it does seem awkward to have a whole module
> providing just one small class that logically is so
> closely related to other threading facilities.
> 
> What we want in this kind of situation is some sort
> of autoloading mechanism, so you can import something
> from a module and have it trigger the loading of another
> module behind the scenes to provide it.
> 

Bad idea unless it is tied to a namespace.  So that users knows where this auto-loaded functionality is coming from.  Otherwise it's just as bad as 'from xxx import *'.

John M. Camara


More information about the Python-Dev mailing list