Phillip J. Eby wrote: > So, what I'd suggest is that the expanded import mechanism would provide a > registry of extensions and handlers,
Urg, global registries again. I'd like this better if the scope of a particular extension and its handler could be restricted to some chosen part of the package namespace. So the author of the 'grail' package can specify a handler for his special '.nun' files, but it only applies to imports within the 'grail' package, and can't conflict with anyone else's registration of a handler for the same extension in other places. Perhaps the handlers pertaining to a package could be attached to the module object for that package, in an __importers__ attribute or something like that. Then, when looking for a handler for a particular file, a search is made upwards from its containing package looking for a handler that matches it. -- Greg _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com