At 03:16 PM 4/23/2007 -0700, Brett Cannon wrote: >The PEP does not explicitly state how to signal that a loader cannot >load a module it is asked to. This could happen if someone called a >loader without consulting its respective importer. I would want to >add something like: >""" >If the loader is unable to load the specified module and a specific >exception is not raised in determining this, ImportError is raised. >This may occur if a loader is called without first consulting an >importer as to if the loader can load the specified module but the >loader is aware of the fact it cannot fulfill the request made. >"""
Okay, now I understand what you're trying to say, but I still don't understand what the purpose is. I mean, what else would you do except raise an error? I.e., isn't the actual contract "load the specified module or raise an exception of some kind"? I mean, how about something like: "If for any reason the loader can't load the requested module, it must raise an exception (such as an ImportError), or allow an existing exception to propagate out of the load_module() call." _______________________________________________ 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