Message205883
As a testament to counter-intuitive API, I did not even realize this about either find_loader() or find_spec() until the bug the other day with reloading submodules. So I'm on board!
As to the best approach, I'll argue for keeping just 1 function. I tried out both ways and in the 2 function approach they simply didn't seem different enough. I've attached a patch (w/o tests, etc.) to show what I'm thinking.
Basically, let's make the "path" parameter keyword-only and rename it to "parent_path" (maybe even "precomputed_parent_path"). The patch takes cues from pkgutil.find_loader(). |
|
Date |
User |
Action |
Args |
2013-12-11 05:59:24 | eric.snow | set | recipients:
+ eric.snow, brett.cannon, ncoghlan, Arfrever |
2013-12-11 05:59:24 | eric.snow | set | messageid: <1386741564.68.0.728669153183.issue19944@psf.upfronthosting.co.za> |
2013-12-11 05:59:24 | eric.snow | link | issue19944 messages |
2013-12-11 05:59:23 | eric.snow | create | |
|