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

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Oct 14 08:52:34 CEST 2005

Sokolov Yura wrote:
> May be allow modules to define __getattr__ ?

I think I like the descriptor idea better. Besides
being more in keeping with modern practice, it would
allow for things like

   from autoloading import autoload

   Foo = autoload('foomodule', 'Foo')
   Blarg = autoload('blargmodule', 'Blarg')

where autoload is defined as a suitable descriptor

I guess we could do with a PEP on this...


More information about the Python-Dev mailing list