Message 180376 - Python tracker (original) (raw)

$ PATH= /usr/bin/which python $ PATH=: /usr/bin/which python ./python $ PATH=/usr: /usr/bin/which python ./python

shutil.which('python', path='') '/usr/bin/python' shutil.which('python', path=':') 'python' shutil.which('python', path='/usr:') 'python'

First, I propose interpret path='' as an empty path, not as a default path (we have None for this). However the interpreting of an empty directory in non-empty PATH can be platform-depending.