[Python-Dev] difficulty of implementing phase 2 of PEP 302 in Python source

Thomas Heller theller at python.net
Thu Sep 28 20:54:02 CEST 2006

Phillip J. Eby schrieb:
> At 11:25 AM 9/28/2006 -0700, Brett Cannon wrote:
>>I will think about it, but I am still trying to get the original question 
>>of how bad the C code is compared to rewriting import in Python from 
>>people.  =)
> I would say that the C code is *delicate*, not necessarily bad.  In most 
> ways, it's rather straightforward, it's actually the requirements that are 
> complex.  :)
> A Python implementation, however, would be a good idea to have around for 
> PyPy, Py3K, and other versions of Python, and as a refactoring basis for 
> writing any new C code.

FYI, Gordon McMillan had a Python 'model' of the import mechanism in his,
(not sure if it was really named) "iu.py".  It was part of his installer utility,
maybe the code still lives in the PyInstaller project.  IIRC, parts of pep 302 were
inspired by his code.


More information about the Python-Dev mailing list