Message220250
| Author |
vinay.sajip |
| Recipients |
lemburg, python-dev, vinay.sajip |
| Date |
2014年06月11日.10:32:35 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1402482755.9.0.0429734003163.issue21709@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> _srcfile is only used to identify the caller's stack frame
Not quite. It's also used to indicate whether findCaller() should be called at all: setting it to None avoids calling findCaller(), which might be desirable in some performance-sensitive scenarios.
So if you mean "just call _get_module_filename() instead of accessing _srcFile", that won't do. If you mean "set _srcFile to the return value of _get_module_filename()", that might work, if I e.g. move the _srcFile definition to after addLevelName (say) and do just
_srcFile = addLevelName.__code__.co_filename
How does that sound? |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年06月11日 10:32:35 | vinay.sajip | set | recipients:
+ vinay.sajip, lemburg, python-dev |
| 2014年06月11日 10:32:35 | vinay.sajip | set | messageid: <1402482755.9.0.0429734003163.issue21709@psf.upfronthosting.co.za> |
| 2014年06月11日 10:32:35 | vinay.sajip | link | issue21709 messages |
| 2014年06月11日 10:32:35 | vinay.sajip | create |
|