When you read PEP 302 and the section on the optional extensions, it mentions that they "are highly recommended for general purpose importers". But then the PEP says very shortly thereafter that "loader objects" are to have the extensions.
So which is it, importers or loaders? The reason I ask is because if one can assume that the extensions are only called on what find_module returns, and thus extensions are only called on loaders, then some caching can be done based on what find_module had to do. In my case I am reimplementing zipimport and if I can assume find_module was called before is_package I can just cache in the object what module names were found to be a package and then have is_package just be a lookup in a set instead of having to read the zip file every time or store all of the ZipInfo files for the zipfile. -Brett _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com