[Python-Dev] Is raising SystemError during relative import the best solution? (original) (raw)
Brett Cannon brett at python.org
Thu Jan 8 20:25:07 CET 2009
- Previous message: [Python-Dev] Getting importlib into the standard library for 3.1
- Next message: [Python-Dev] Is raising SystemError during relative import the best solution?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
So it turns out that if you try to do a relative import where a parent is not loaded, it raises a SystemError. This has been in there since Guido added package support back in the day. But this seems more like an ImportError than a SystemError to me. My guess is that the original purpose was to signify someone specified some relative import name without the proper stuff to make the name resolve to what it should be. But that to me is still an ImportError as the name came out wrong, not that the system did something incorrectly.
So I would like to propose to remove the SystemError and make it an ImportError. Anyone object?
-Brett
- Previous message: [Python-Dev] Getting importlib into the standard library for 3.1
- Next message: [Python-Dev] Is raising SystemError during relative import the best solution?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]