[Python-Dev] New Import Hooks PEP, a first draft (and req. for PEP #)

Fredrik Lundh fredrik@pythonware.com
Fri, 20 Dec 2002 08:47:26 +0100


Aahz keeps confusing me:

> Any reason we can't require importer objects to be new-style classes,
> which could then use __new__?  (I vaguely recall some discussion about
> this, but it should be documented in the PEP.)

any reason we *should* require importer objects to be new-style
classes?

if you think raising exceptions is a problem, please say so.

if you have a valid argument for using return values instead of exceptions
(it's not like people will be installing thousands of hooks, so it's not obvious
what the problem is), is there any reason not to allow people to use *any*
callable object that can return a value?  (including three-line wrappers for
pre-2.2 classes).

</F>