This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arigo
Recipients arigo
Date 2012-10-24.10:37:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za>
In-reply-to
Content
On Posix, it is documented that setting PATH to the empty string is equivalent to not setting PATH at all, which is an exception to the rule that in a string like "/bin::/usr/bin" the empty string in the middle gets interpreted as ".".

PYTHONPATH does not have this exception: an empty PYTHONPATH is interpreted as equivalent to ".".

This difference is not documented.  This is a detail, but a possible source of confusion, so I'm reporting it here.

How to reproduce:

file x/x.py: "import z"
file z.py: "print(42)"

The following two lines behave differently (Bash syntax):

PYTHONPATH= python x/x.py
unset PYTHONPATH && python x/x.py

For comparison, if "./foo" is an executable, the following two lines behave identically (neither finds "./foo"):

PATH= foo
unset PATH && foo
History
Date User Action Args
2012-10-24 10:37:40arigosetrecipients: + arigo
2012-10-24 10:37:40arigosetmessageid: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za>
2012-10-24 10:37:40arigolinkissue16309 messages
2012-10-24 10:37:40arigocreate