[issue31415] Add -X option to show import time

Barry A. Warsaw report at bugs.python.org
Fri Nov 3 16:38:15 EDT 2017


Barry A. Warsaw <barry at python.org> added the comment:

On Nov 3, 2017, at 11:05, Serhiy Storchaka <report at bugs.python.org> wrote:
> 
> But now, after adding the environment variable, do we still need the -X option? From a user side I don't see much difference between specifying an option and an environment variable, but the code for handling the environment variable is much simpler.

It’s a good question.  I guess in the limited amount of time I’ve used the feature so far, I find it kind of nice to be able to type `python -X importtime` when doing general import profiling.  The use case for the environment variable is more compelling IMHO which is why I really wanted to add it.  I suppose typing `PYTHONPROFILEIMPORTTIME=x python` isn’t *too* onerous, even if it is kind of a weird long mashed together word.

I suppose I’m -0 on removing the -X option, and +0 on adding the negative cache.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31415>
_______________________________________


More information about the Python-bugs-list mailing list