This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.snow
Recipients Arfrever, brett.cannon, eric.snow, ncoghlan
Date 2013-12-11.05:59:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1386741564.68.0.728669153183.issue19944@psf.upfronthosting.co.za>
In-reply-to
Content
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().
History
Date User Action Args
2013-12-11 05:59:24eric.snowsetrecipients: + eric.snow, brett.cannon, ncoghlan, Arfrever
2013-12-11 05:59:24eric.snowsetmessageid: <1386741564.68.0.728669153183.issue19944@psf.upfronthosting.co.za>
2013-12-11 05:59:24eric.snowlinkissue19944 messages
2013-12-11 05:59:23eric.snowcreate