Hi,

I updated my PR https://github.com/python/cpython/pull/31542 and I
plan to merge it soon.

It seems like most people need and like this feature.

About the feature name, nobody liked the "add_path0" name which is
misleading: "path0" is not easy to get, and the path is prepended, not
added.

I renamed "add_path0" to "safe_path" (opposite meaning) and I renamed
"PYTHONDONTADDPATH0" env var to "PYTHONSAFEPATH": shorter, easy to
write.

In terms of usability, IMO "safe_path=1" is easier to understand than
"add_path0=0". For the exact meaning of this option, well, I wrote
documentation.

In the documentation, I replaced "don't add sys.path[0]" with "don't
prepend an unsafe path to sys.path: (...)" with an explanation of
which "unsafe path" is prepended.

Adding this -P command line option makes the Python command line even
more complicated, with existing -I and -E options, the "._pth" file,
etc. But well, not all users want the same thing ;-)

Victor
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/5HOOBV7AOH2P7CR4RA2IAESFVQ2OQHLL/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to