Message295065
s/Warn/Explicitly note/ in the issue title :)
I think this is actually both important enough and subtle enough to warrant a ".. note::" callout in the docs.
In Python 3, it would say to use `sys.meta_path.insert(0, finder)` if you want your finder to take precedence over the default search locations, and `sys.meta_path.append(finder)` if you only want it handle cases that aren't already handled by the default machine.
In Python 2, it would say that custom finders on `sys.meta_path` will always take precedence over the default machinery, and if you want to do otherwise, you'll need to use `importlib2` and install its loaders into `sys.meta_path` ahead of your own. |
|
Date |
User |
Action |
Args |
2017-06-03 05:30:44 | ncoghlan | set | recipients:
+ ncoghlan, brett.cannon, pitrou, xmorel, docs@python, eric.snow |
2017-06-03 05:30:44 | ncoghlan | set | messageid: <1496467844.5.0.49207187799.issue30535@psf.upfronthosting.co.za> |
2017-06-03 05:30:44 | ncoghlan | link | issue30535 messages |
2017-06-03 05:30:44 | ncoghlan | create | |
|