Message158498
| Author |
brett.cannon |
| Recipients |
brett.cannon, eric.snow, pitrou, r.david.murray |
| Date |
2012年04月16日.21:13:44 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1334610825.15.0.928567560303.issue14551@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Well, I want backwards-compatibility *now*, not forever.
And no, it is not an obvious API as you are asking for what loaders are supposed to do; load a module, which is why the one-liner I gave you works today. Finder simply find a loader that can load something that they are asked to discover. Loader then load something that they are told to load, whether it was found through a finder for sys.path or explicitly pointed at something.
Another option is to have SourceFileLoader.load_module() take no argument since its constructor already has everything needed to load a module passed in which simplifies the API a little bit. But that would be a non-standard broadening of the loader API and I don't know if people will like that. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年04月16日 21:13:45 | brett.cannon | set | recipients:
+ brett.cannon, pitrou, r.david.murray, eric.snow |
| 2012年04月16日 21:13:45 | brett.cannon | set | messageid: <1334610825.15.0.928567560303.issue14551@psf.upfronthosting.co.za> |
| 2012年04月16日 21:13:44 | brett.cannon | link | issue14551 messages |
| 2012年04月16日 21:13:44 | brett.cannon | create |
|