Nick Coghlan <ncogh...@gmail.com> added the comment:

Regarding environment variables, note that they get used in two *very* 
different ways:

1. The "persistent shell setting" case that Raymond describes. While setting 
PYTHONBYTECODEPATH to always point to a RAM disk could make quite a bit of 
sense for some developers, it's more likely that this case would be associated 
with tools like `pipenv shell`.

2. The "inheritable process setting" case, where you prepend the environment 
variable setting to a shell command, or add it to the env dict in a Python 
subprocess call.

Anywhere that I used this setting, I'd want it to be passed along to child 
processes, so an environment variable would be a lot more useful than a command 
line option.

If we did add an option, then a named -X option would probably make the most 
sense.

Regarding the state caching: having this be read once at startup would help 
avoid a lot of potential for weird state inconsistencies where some modules 
were loaded from one cache directory, while later modules were loaded from a 
different one.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33499>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to