Commit 197f0447 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-35755: Don't say "to mimick Unix which command behavior" (GH-12861)

parent 693c104a
......@@ -188,7 +188,7 @@ def find_executable(executable, path=None):
# os.confstr() or CS_PATH is not available
path = os.defpath
# bpo-35755: Don't use os.defpath if the PATH environment variable is
# set to an empty string to mimick Unix which command behavior
# set to an empty string
# PATH='' doesn't match, whereas PATH=':' looks in the current directory
if not path:
......
......@@ -1317,7 +1317,7 @@ def which(cmd, mode=os.F_OK | os.X_OK, path=None):
# os.confstr() or CS_PATH is not available
path = os.defpath
# bpo-35755: Don't use os.defpath if the PATH environment variable is
# set to an empty string to mimick Unix which command behavior
# set to an empty string
# PATH='' doesn't match, whereas PATH=':' looks in the current directory
if not path:
......
......@@ -2,5 +2,4 @@
``os.confstr("CS_PATH")`` if available instead of :data:`os.defpath`, if the
``PATH`` environment variable is not set. Moreover, don't use
``os.confstr("CS_PATH")`` nor :data:`os.defpath` if the ``PATH`` environment
variable is set to an empty string to mimick Unix ``which`` command
behavior.
variable is set to an empty string.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment