[Python-Dev] Complexity of import.c

Martin v. Löwis Martin v. Löwis
Mon, 9 Dec 2002 18:43:18 +0100


> I see that my patch to import.c has been criticized
> as adding to the complexity of an already complex module.
> I don't entirely agree.  If you want to have the standard
> library available as a zip module, you must have zip file
> import available in C.  The patch I proposed in PEP 273
> was a minimalist patch; it adds as little as possible
> while still keeping package import and preserving all
> import semantics.

This is not the case. Much of the complexity of the patch stems from an
(atleast perceived) attempt to reorganize import.c. For example:

- why did is_builtin have to go?
- Was the ExternalNames dictionary really necessary?
- Why was the HAVE_READLINK chunk moved?
- What is the purpose of Get/SetScriptName?

Regards,
Martin