Message158478
| Author |
r.david.murray |
| Recipients |
brett.cannon, eric.snow, pitrou, r.david.murray |
| Date |
2012年04月16日.16:07:52 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1334592473.2.0.465411078087.issue14551@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The one-liner is "good enough", but...
The use case is indeed loading a module from an arbitrary file without having to worry about sys.path, etc. For that load_source is intuitive. The one-liner is an adequate substitute, but feels like a step backward for this particular use case. That is, load_source is a *convenience* function, from my POV :)
I did not use the 'file' argument. If I were dealing with an already open file it would seem more natural to use imp.load_module. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年04月16日 16:07:53 | r.david.murray | set | recipients:
+ r.david.murray, brett.cannon, pitrou, eric.snow |
| 2012年04月16日 16:07:53 | r.david.murray | set | messageid: <1334592473.2.0.465411078087.issue14551@psf.upfronthosting.co.za> |
| 2012年04月16日 16:07:52 | r.david.murray | link | issue14551 messages |
| 2012年04月16日 16:07:52 | r.david.murray | create |
|