Importing by file name

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sun Nov 24 15:15:53 CET 2013


On Sun, 24 Nov 2013 19:07:38 +1100, Chris Angelico wrote:

> I know the recent Pythons give a lot of import power to the script. But
> maybe I'm just asking too much, and some of this stuff really is magical
> and implemented in C?

That was the case up to 3.3, but Python 3.4 has the import machinery re-
written in pure Python (except for a tiny bit of bootstrapping machinery, 
if I understand correctly). I understand that nobody understood the 
import machinery in full (although there were a couple of people who 
understood most of it), and that moving it to Python was a Herculean job. 
If I remember correctly, it uncovered a number of undetected bugs and 
dark corners with unspecified behaviour.



-- 
Steven



More information about the Python-list mailing list